1 / 6

R Learning Guide: Hands-on Folders & Functions

Learn organizing folders, working with data sets, manipulating data, plotting data, writing functions in R. Hands-on approach with step-by-step guidance to master R commands and functions.

ownah
Télécharger la présentation

R Learning Guide: Hands-on Folders & Functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Learning R hands on

  2. Organization of Folders: • Class Data folder has datasets (end in .csvor .rda) • Rcode has the scripts of R commands that can cut and pasted into an R window (end in .R) • Ppt has the powerpoints

  3. The Basics Rintro.R • Reading in comma separated data • Listing a data set or its components • Subscripts • Sequences and combing values (: and “c”) • Creating a new data set with <- • Arithmetic in R • Applying some stats to data • Saving your work

  4. Fooling with the data RintroManipulating.R • Subscripting to get a subset of data • Working with rows and columns • Arithmetic on a column at once Pay attention to where the commas are! e.g. BT2[3,5] BT2[3,] BT2[,5] BT2[,3:5] or BT2[1:10,3:5] These are all different!

  5. Plotting DataRintroPlotting.R • Histogram hist • Adding more features to the plot • Scatterplots using plot • Box plots for several data sets boxplot • Adding text to a scatter plot • Changing the axes scales Build a complicated plot by adding features through several simple steps

  6. Writing functionsRintroFunctions.R • The uses for { } and ( ) • What goes in and what comes out • Listing a function • Optional arguments • Calling a function and assigning its results to a new data set • Review of R arithmetic

More Related