My first introduction about how to use R is here.
I have attended in the Workshop hosted by UVa library statistics consulting group. It was useful for me because they provide the detailed descriptions and explanations about each code. Because my first experience of R did not include any of those step-by-step explanations about how to use R. This workshop provided explanations of the each code in the SCRIPTS window with “#”. And by clicking ctrl + enter, the results of running those code were show in the CONSOLE, so that I could follow easily what I was doing with R.
I have summarized my notes below:
- ctrl +enter: bring codes from scripts to console
- write down orders in R script (upper left) and click ctrl+enter to see the results in the Console
- # the rm function removes objects from memory
- rm(x, y, z)
- or broom mark upper right where s,y,z showed
- Setting working directory
- [menu] session–> set working directory
- tab key will call folder to put ” “
- names: name of the columns
- nrow: number of rows
- ncol: cumber of columns.
- $ will help to see certain culumns
- can calculate frequencies or numeric
- to see the numbers put the order in the ( )
- subsetting : use [ ]
- c( ): select columns (name of the column) # for example, c(company, sales)
- save the file as .Rda by selecting sections and saved it as new name