The best way to learn a tool is to use it. When you can’t figure out how to do something don’t give up. Continue to play with the program and search google for solutions. Any frustration you encounter will be worth it when you can bend your tool to your will!
Cole Nussbaumer Knaflic: “Storytelling with Data: A Data Visualization Guide for Business Professionals”.
?mean
help(":")
?'?'
help.search("csv")
example("mean")
??plotting
example(plot)
x <- 12
Everything that exists is an object. Everything that happens is a function call. — John Chambers
fnname(arg1 = val1, arg2 = val2, ...)
rnorm(n = 10)
?mean
ls()
to list objects from the global environmentrm()
to remove objects (e. g. to save memory if the object is very large)vals <- 1:10
ls()
[1] "addTwo" "class" "clean" "colFilter"
[5] "countNA" "f" "file" "files"
[9] "h" "hello" "i" "l"
[13] "m" "mat" "meanAge" "model"
[17] "month" "myDF" "mySum" "new"
[21] "numbers" "oldest" "pred" "result"
[25] "rowFilter" "rSquared" "semester" "site"
[29] "soccer" "study" "surv" "survived_pred"
[33] "tab" "titanic" "val" "vals"
[37] "x" "youngest"
rm("vals")
ls()
[1] "addTwo" "class" "clean" "colFilter"
[5] "countNA" "f" "file" "files"
[9] "h" "hello" "i" "l"
[13] "m" "mat" "meanAge" "model"
[17] "month" "myDF" "mySum" "new"
[21] "numbers" "oldest" "pred" "result"
[25] "rowFilter" "rSquared" "semester" "site"
[29] "soccer" "study" "surv" "survived_pred"
[33] "tab" "titanic" "val" "x"
[37] "youngest"
"./"
which is the default working directorygetwd()
to see the current working directorygetwd()
"./"
is the default working directory, e.g. the project’s root folder"../"
moves one level up"~/"
is the home directory of the current userlist.files("./") # same level as getwd() (e.g. the root folder of the project)
list.files("~/") # home directory
list.files("../") # move one level up (e.g. the desktop here)