Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rstudio [2013/04/04 14:54]
amelia
rstudio [2016/05/13 20:45] (current)
Line 1: Line 1:
-===== RStudio ​===== +===== RStudio® ​===== 
-==== What is RStudio? ==== +==== What is RStudio®? ==== 
-For this deployment of Mobilize, we're going to be using the tool [[http://​www.rstudio.com/​|RStudio]]. RStudio ​is an "​Interactive Development Environment"​ (or IDE for short) that supports R programming. For more on IDEs, check out this [[wp>​Integrated_development_environment|Wikipedia article]]. Basically,  ​RStudio ​makes it easier to keep track of files, type code, view images, and many other handy things. ​+For this deployment of Mobilize, we're going to be using the tool [[http://​www.rstudio.com/​|RStudio®]]. RStudio® ​is an "​Interactive Development Environment"​ (or IDE for short) that supports R programming. For more on IDEs, check out this [[wp>​Integrated_development_environment|Wikipedia article]]. Basically,  ​RStudio® ​makes it easier to keep track of files, type code, view images, and many other handy things. ​
 ==== What is R? ==== ==== What is R? ====
 [[http://​www.r-project.org/​|R]] is a statistical programming language that is free and open source. It's used by more than 250,000 people worldwide, and if you want to read more about it, check out this [[http://​www.nytimes.com/​2009/​01/​07/​technology/​business-computing/​07program.html|New York Times article from 2009]]. ​ [[http://​www.r-project.org/​|R]] is a statistical programming language that is free and open source. It's used by more than 250,000 people worldwide, and if you want to read more about it, check out this [[http://​www.nytimes.com/​2009/​01/​07/​technology/​business-computing/​07program.html|New York Times article from 2009]]. ​
  
-Everything that we're doing in the curriculum could be completed using just the R language, but we're going to focus specifically on R within ​RStudio.+Everything that we're doing in the curriculum could be completed using just the R language, but we're going to focus specifically on R within ​RStudio®.
  
 ==== About This Guide ==== ==== About This Guide ====
-The preliminary sections in this guide will be to get you started in RStudio– how open the program, load in data, and understand the various panes that divide the page. Then, topics will be covered in roughly the order they are mentioned in the curriculum.\\ ​+The preliminary sections in this guide will be to get you started in RStudio®– how open the program, load in data, and understand the various panes that divide the page. Then, topics will be covered in roughly the order they are mentioned in the curriculum.\\ ​
  
 The majority of this guide will be largely concerned with short code snippets, showing code in a format like this The majority of this guide will be largely concerned with short code snippets, showing code in a format like this
Line 17: Line 17:
 ## [1] 132.9 ## [1] 132.9
 </​code>​ </​code>​
-When you see this type of formatting, you can know that the top section was run in the Console (see [[rstudio:​panes|Panes in RStudio]] for more information about the Console), and the results are shown on the lines designated by ##. Most times that something is shown with button clicking in the RStudio ​interface, corresponding R code will be shown in this same format. +When you see this type of formatting, you can know that the top section was run in the Console (see [[rstudio:​panes|Panes in RStudio]] for more information about the Console), and the results are shown on the lines designated by ##. Most times that something is shown with button clicking in the RStudio® ​interface, corresponding R code will be shown in this same format
-==== Opening ​RStudio ​==== + 
-While RStudio ​can be run as a desktop application,​ we'll be using it exclusively in the browser. This means that you can access your work from any computer connected to the internet, and all your code and data will be available for you 24/7. To get to RStudio, open a web browser (like Firefox or Google Chrome) and navigate to [[http://www.rstudio.mobilizingcs.org/​]]. You will be prompted for your username and password on a page like this,+The data used in the examples shown on this wiki are from the Exploring Computer Science Unit 5 materials (available [[http://​www.exploringcs.org/​wp-content/​uploads/​2010/​08/​Unit-5-data-files.zip|here]]). Most examples use the ''​labike.csv''​ file, the ''​cdc.rda''​ file or the ''​CATwitter.robj''​ file.  
 +==== Opening ​RStudio® ​==== 
 +While RStudio® ​can be run as a desktop application,​ we'll be using it exclusively in the browser. This means that you can access your work from any computer connected to the internet, and all your code and data will be available for you 24/7. To get to RStudio®, open a web browser (like Firefox or Google Chrome) and navigate to [[https://​rstudio.mobilizingcs.org/​auth-sign-in]]. You will be prompted for your username and password on a page like this,
 {{ :​rstudio:​rstudiologin.png?​direct&​700 |RStudio login}} {{ :​rstudio:​rstudiologin.png?​direct&​700 |RStudio login}}
  
-If you don't know your username or password, ​contact ​[[:user/steve|Steve]].+If you don't know your username or password, ​please visit our [[:contact|contact page]] for support options.
  
 Once you have logged in, you should see something like this: Once you have logged in, you should see something like this:
Line 33: Line 35:
  
 ==== What do you want to do? ==== ==== What do you want to do? ====
-For an explanation of the panes in RStudio, see [[rstudio:​Panes]].+  * For an explanation of the panes in RStudio®, see [[rstudio:​Panes]]
 + 
 +  * Learn how to [[rstudio:​open_data|open data]] of different types (like .csv, .rda, .robj files). 
 + 
 +  * Start [[rstudio:​Examining_Data|examining data]]. Learn about the [[rstudio:​Examining_Data#​The_dollar_sign|dollar sign]] and [[rstudio:​Examining_Data#​Square_brackets|square brackets]], make [[rstudio:​Examining_Data#​Summaries_of_data|summaries]] (or "​frequency tables"​),​ find the [[rstudio:​Examining_Data#​Length_and_dimension|length and dimension]] of a variable or dataset, create [[rstudio:​Examining_Data#​Tables|tables]] (or "​contingency tables"​),​ and [[rstudio:​Examining_Data#​Determining_data_type|determine the data type]] for a dataset or variable.  
 + 
 +  * [[rstudio:​Finding_things_out|Find things out about data]], like how to [[rstudio:​Finding_things_out#​Sorting|sort]] data, and find [[rstudio:​Finding_things_out#​Descriptive_statistics|descriptive statistics]] (like mean, median, mode, max, min)
  
-Learn how to [[rstudio:open_data|open data]] of different types (like .csv.rda.robj files).+  * Learn how to [[rstudio:Putting_things_together|put things together]], using the [[rstudio:​Putting_things_together#​equals_sign|equals sign]]by [[rstudio:​Putting_things_together#​Creating_vectors|creating vectors]], using [[rstudio:​Putting_things_together#​column_and_row_binding|column- and row-binding]],​ or [[rstudio:​Putting_things_together#​transforming_data|transforming data]]
  
-Start [[rstudio:​Examining_Data|examining data]]. Learn about the [[rstudio:​Examining_Data#​The_dollar_sign|dollar sign]] and [[rstudio:​Examining_Data#​Square_brackets|square brackets]], make [[rstudio:​Examining_Data#​Summaries_of_data|summaries]] (or "​frequency tables"​)find the [[rstudio:Examining_Data#​Length_and_dimension|length and dimension]] of a variable or datasetcreate ​[[rstudio:Examining_Data#Tables|tables]] (or "​contingency tables"​),​ and [[rstudio:Examining_Data#Determining_data_type|determine the data type]] for a dataset or variable+  * If you only care about a piece of the datalearn how to use the [[rstudio:Subset_data|subset]] commandhow to [[rstudio:Subset_data#subsetting_with_text|subset with text]] or do [[rstudio:Make_maps#spatial_subsetting|spatial subsetting]]. 
  
-[[rstudio:Finding_things_out|Find things out about data]], like how to [[rstudio:Finding_things_out#Sorting|sort]] dataand find [[rstudio:Finding_things_out#Descriptive_statistics|descriptive statistics]] (like meanmedian, mode, max, min)+  * For geographic data, learn how to [[rstudio:Make_maps|make a map]], [[rstudio:Make_maps#zooming|zoom in]], [[rstudio:Make_maps#Spatial_subsetting|create a spatial subset]], or make a [[rstudio:​Make_maps#​bubble_chart|bubble chart]]
  
-Learn how to [[rstudio:Putting_things_together|put things together]], using the [[rstudio:Putting_things_together#equals_sign|equals sign]], by [[rstudio:Putting_things_together#Creating_vectors|creating vectors]], using [[rstudio:Putting_things_together#column_and_row_binding|column- ​and row-binding]], or [[rstudio:Putting_things_together#transforming_data|transforming data]]. +  * To make plots, learn about the [[rstudio:plots|plot command]], as well as the specific ways to create ([[rstudio:plots#bar_plots|bar plots]], [[rstudio:plots#mosaic_plots|mosaic plots]], [[rstudio:plots#histograms]], ​and [[rstudio:​plots#​box_plots|box plots]]. If you want to change something about a plotcheck out [[rstudio:​plots#​changing_things_about_plots|changing things about plots]] to learn how to change axis labels, add a title, change colors and symbols, rotate labels and more! If you want to use a plot in another document, learn how to [[rstudio:plots#Saving_plots|save a plot]]. 
  
-If you only care about a piece of the datalearn how to use the [[rstudio:subsetting|subset]] command, ​how to [[rstudio:subsetting#subsetting_with_text|subset with text]] or do [[rstudio:Making_a_map#spatial_subsetting|spatial subsetting]]. +  * For text analysisstart by [[rstudio:Text#​Initializaing_text|initializing text]] so R knows how to interpret it, then [[rstudio:Text#Looking_at_text_data|inspect ​text]] and [[rstudio:​Text#​Processing_text|process text]] to convert words to lower case, remove numbers, etc. To analyze your text, create a [[rstudio:​Text#​Bar_plot_of_words|bar plot]] or [[rstudio:Text#Word_cloud|word cloud]].
  
-For geographic data, learn how to [[rstudio:Making_a_map|make a map]][[rstudio:Making_a_map#​zooming|zoom in]], [[rstudio:Making_a_map:Spatial_subsetting|create a spatial subset]], or make a [[rstudio:Making_a_map#​bubble_chart|bubble chart]]. +  * Learn how to [[rstudio:Finding_Help|find Help]] and [[rstudio:Closing_RStudio|close RStudio®]], or see some [[rstudio:Tips_and_Tricks|Tips and Tricks]] or [[rstudio:Useful_Terms|Useful Terms]]. If you're stuckcheck out the [[rstudio:FAQ|Frequently Asked Questions]] page.
  
-To make plots, learn about the [[rstudio:plots|plot command]], as well as the specific ways to create ([[rstudio:plots#​bar_plots|bar plots]], [[rstudio:​plots#​mosaic_plots|mosaic plots]], [[rstudio:​plots#​histograms]],​ and [[rstudio:​plots#​box_plots|box plots]]If you want to change something about a plot, check out [[rstudio:​plots#​changing_things_about_plots|changing things about plots]] to learn how to change axis labels, add a title, change colors and symbols, rotate labels and more! If you want to use a plot in another document, learn how to [[rstudio:​plots#​Saving_plots|save a plot]]+  * Get a one-page summary of relevant R commands from {{:rstudio:rsheet.pdf|R Cheat Sheet}} 
  
-For text analysisstart by [[rstudio:Text_analysis#​Initializaing_text|initializing text]] so R knows how to interpret it, then [[rstudio:Text_analysis#​Looking_at_text_data|inspect text]] and [[rstudio:Text_analysis#​Processing_text|process text]] to convert words to lower case, remove numbers, etcTo analyze your text, create a [[rstudio:​Text_analysis#​Bar_plot_of_words|bar plot]] or [[rstudio:Text_analysis#​Word_cloud|word cloud]].+==== Video Tutorials ==== 
 +There are also a number of video tutorials that can help you through some of the content on this wiki. They can be found, by topic here: 
 +  * [[http://​youtu.be/​0h2b3sO5DT8|Introduction to Rstudio®]] 
 +  * [[http://​youtu.be/​cFiTUg_B934|Plots]] 
 +  * [[http://youtu.be/​e2XkA-_OovM|Map analysis]] 
 +  * [[http://​youtu.be/​kgu6a55X2JA|Text analysis]]
  
-Learn how to [[rstudio:​Finding_Help|find Help]] ​and [[rstudio:​Closing_RStudio|close ​RStudio]]or see some [[rstudio:​Tips_and_Tricks|Tips and Tricks]] or [[rstudio:​Useful_Terms|Useful Terms]]+All rights ​to RStudio® ​and Shiny™ are exclusive to RStudio, ​Inc.
Print/export