No matter how much you know about the R ecosystem already, you’ll always have more to learn. At RStudio, we know that everyone is at a different stage in learning the vast ecosystem of R, ranging from rank beginner to seasoned data scientists to professional educators. Choose a starting point below, or catch up with us on our blog. SF Soundworks' vision is to provide world-class studio facilities for major label productions while nurturing a community of independent artists. Our studios combine amazing SSL 9000J mixing cons oles with a colorful array of vintage gear, classic analog tape recorders, and carefully optimized ProTools HD systems.
Basic Data Analysis through R/R Studio
In this tutorial, I 'll design a basic data analysis program in R using R Studio by utilizing the features of R Studio to create some visual representation of that data. Following steps will be performed to achieve our goal.R Studio Size
- Downloading/importing data in R
- Transforming Data / Running queries on data
- Basic data analysis using statistical averages
- Plotting data distribution
R Studio Ssl
Let's go over the tutorial by performing one step at a time.
1. Importing Data in R Studio
The second way to import the data set into R Studio is to first download it onto you local computer and use the import dataset feature of R Studio. To perform this follow the steps below
1. Click on the import dataset button in the top-right section under the environment tab. Select the file you want to import and then click open. The Import Dataset dialog will appear as shown below
Any dataset can be viewed by executing the following line:
View(acs)
where acs is the variable dataset is assigned to.
2. Transforming Data
To access a particular column, Ex. age_husband in our case.
acs$age_husband
a <- subset(acs , age_husband > age_wife)
Getting Statistical Averages from data
Following functions can be used to calculate the averages of the dataset- For mean of any column, run : mean(acs$age_husband)
- Median, run : median(acs$age_husband)
- Quantile , run : quantile(acs$age_wife)
- Variance , run : var(acs$age_wife)
- Standard Deviation , run : sd(acs$age_wife)
summary(acs)
4. Plotting Data
To create a scatter plot of a data set, you can run the following command in console
plot(x = s$age_husband , y = s$age_wife, type = 'p')
For data distribution plots, there are several features tools and packages available in R that you can use to draw any kind of distribution. For example
To draw a Histogram of a dataset, you can run the command
hist(acs$number_children)
Similarly for Bar Plots, run the following set of commands
counts <- table(acs$bedrooms)
barplot(counts, main='Bedrooms Distribution', xlab='Number of Bedrooms')
I hope this will give you a basic idea on how to do simple statistics in R.
Note
You can use ? before any function name to view the official documentation
Since opening in August 2003, we've been excited to work with:
D'Angelo, Timbaland, The Shins, New Order, Ice Cube & Lil Jon,
Alanis Morissette, DJ Shadow, Radiohead, Lyrics Born, Strata,
Joe Chiccarelli, Jonathan Richman, Blackalicious, Lateef,
Producer/Mixer Russell Elevado (Alicia Keys, D'Angelo, The Roots)
Will Smith, Roy Hargrove (Verve Records), STS9,
Cocteau Twins' Robin Guthrie, Keane, Todd Rundgren,
Smashmouth, Vanessa Carlton, Third Eye Blind,
The Sounds w/ Producer Jeff Saltzman (The Killers)
Why? (Anticon Records), Subtle (EMI), Dan the Automator,
John Cale (The Velvet Underground), Chuck Ainlay (Dire Straits, Sheryl Crow)
Oranger (Eenie Meenie Records), Halou,
Jason Lehning (Guster, Erasure, Nickel Creek, Alison Kraus)
The Cardigans, R.E.M., The Kronos Quartet,
Rogue Wave (Sub Pop) w/ Bill Racine (The Flaming Lips, Mercury Rev)
I AM SPOONBENDER, Cheb I Sabbah (Six Degrees Records),
Jim Gaines (Producer: Santana, Steve Miller, Etc.),
Howard Johnston (Mixer: George Winston, The Residents, Etc.),
Drist, Whirl Magnet, Excuses For Skipping, Bill, Burden Brothers,
Goapele, Jeff Black, Diesel Tracks/J-Quest, Thistle, Elephone,
Nraevis, Matthew Stewart,
MiniPop, Every Move a Picture, The Dont's, Bill, PC Munoz,
The Animators, Lexx/Jason Moss, Essence, Derek Lassiter,
Death Angel, Cameron Ember, Sorella, Death of a Party,
Steve Dood, Zachary Dodds, Domeshots, Elijah Nisenboim,
The Bedroom Walls, The Stratford 4, Outline Kit, John Price,
Adam Rossi/Sweet Duration, Lori Amat, The Disappointment,
The Otherside, Mixed Signals, Madelia, Prairie Prince,
Jeff Anthony (Sheryl Crow, Eric McFadden)
Producer Raz Kennedy with Mixer Dave Frazer