CSCI N207 Data Analysis Using Spreadsheet Department of Computer and Information Science IUPUI
R Introduction What is R? Why R A software environment for statistical computing and graphics (https://www.r-project.org/) Why R A few lines in R could save hours of struggling in a spreadsheet pages of programming code in Java Open source software tool, free for everybody Great for plotting graphics or fitting statistical models Run on UNIX, Windows and MacOS
R Introduction What do we do on R? Software tools similar to R Importing data from spreadsheets or databases Process data Run statistical analysis Perform data visualization Software tools similar to R MatLab SPSS SAS Mathematica …
R Introduction Download and install R on your computer http://ftp.ussg.iu.edu/CRAN/ http://www.rstudio.org ( a more user-friendly version)
R Introduction Data Imports Import data from a .csv file Prepare a csv file by exporting data from a spreadsheet or database Create a folder on your computer as your R workspace Copy the csv file into the workspace Set the folder as your workspace Load the csv data into R Note: For every “\” in the path, add a “\”.
R Introduction use the data
R Introduction Can press the up arrow or the down arrow to scroll through commands typed earlier, or type in “history()” Can install RExcel and run R inside Excel - http://rcom.univie.ac.at/ Additional tutorials and examples https://cran.r-project.org/manuals.html http://www.cookbook-r.com/