You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.
To whom it may concern:
As I am still unfamiliar (although trying to find more time to explore) with Github/Git, I'm submitting my checkout contribution via email. I've been exploring the https://datacarpentry.org/R-genomics/01-intro-to-R.html webpage and found a spot I think might be more easily understandable if an addition is made. At the bottom of "Creating objects" the fact that = and -> can be used is mentioned. I would suggest two things:
Inside "creating objects" -- "->" is discouraged so that your code is easily readable by others as the standard methodology is "<-".
Inside "Functions" - I would add an example around a function that takes in more than 1 value (ex: median). Have the attendees work through the following after looking at "args". This will allow them to see the difference between = and <- when it comes to functions and may reinforce the idea that <- is used to assign values to objects.
mean(x=1:10); x (Ans: 5.5 and does not exist error)
mean(x<-1:10); x (ans: 5.5 and c(1,2,3,4,5,6,7,8,9,10))
y<-1:100; mean(y); mean(x=y); x; mean(x<-y); x (ans: 50.5; 50.5; c(1,2,3,4,5,6,7,8,9,10); 50.5; c(1:100))
This is also allows reinforcement of the idea that objects can be used for args, but would then need to clarify that without designated args, the objects/values are read in in order; with args, they can be listed in any order
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
To whom it may concern:
As I am still unfamiliar (although trying to find more time to explore) with Github/Git, I'm submitting my checkout contribution via email. I've been exploring the https://datacarpentry.org/R-genomics/01-intro-to-R.html webpage and found a spot I think might be more easily understandable if an addition is made. At the bottom of "Creating objects" the fact that = and -> can be used is mentioned. I would suggest two things:
Inside "creating objects" -- "->" is discouraged so that your code is easily readable by others as the standard methodology is "<-".
Inside "Functions" - I would add an example around a function that takes in more than 1 value (ex: median). Have the attendees work through the following after looking at "args". This will allow them to see the difference between = and <- when it comes to functions and may reinforce the idea that <- is used to assign values to objects.
mean(x=1:10); x (Ans: 5.5 and does not exist error)
mean(x<-1:10); x (ans: 5.5 and c(1,2,3,4,5,6,7,8,9,10))
y<-1:100; mean(y); mean(x=y); x; mean(x<-y); x (ans: 50.5; 50.5; c(1,2,3,4,5,6,7,8,9,10); 50.5; c(1:100))
This is also allows reinforcement of the idea that objects can be used for args, but would then need to clarify that without designated args, the objects/values are read in in order; with args, they can be listed in any order
The text was updated successfully, but these errors were encountered: