Intro to R-project

A second start at learning r-project.

Some very useful commands: Importing a csv file

yrseq=read.csv("/users/sarod/documents/details_yr_seq.csv")

To view the contents of the file that was just imported

yrseq

Note that this isn’t a command – this is the name used from the command to import the file.

What is the current working directory

getwd()

When the file was imported, you could pull up the data using the variable name, which would be yrseq in this case. The following command makes the same thing true for all the column names.

attach(yrseq)

After putting in the above command, I can now type in the name of a field and get the data list. “tpd_base” for example.

List the names of the datasets loaded

ls()

List the names of variable in a given dataset

names (yrseq)

Starting Rserve Using Tableau with R-Project

References for the above:

R Tutorial Dr. Mark Gardner