1 / 11

Reproducible Research with R: Comprehensive Guide and Examples

Learn how to conduct reproducible research in R, from data collection to sharing results, with detailed explanations and code examples covering data types, complex objects, operations, and subsetting. Use the guide to efficiently create reports and easily replicate experiments all in one document. Quick introduction to the R language. Includes hands-on example using R and the KNITR library for report generation. Explore data sources and useful links for further learning.

Download Presentation

Reproducible Research with R: Comprehensive Guide and Examples

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. Reprodukovatelnyvyskum

  2. Reprodukovatelnyvyskum Zaznamenavaniepriebehuanalyzydat Vytvaraniereportu Zdielanieudajov / zdrojovehokodupouzitehopri analyze / vysledkov Uplnainformaciapotrebna pre zopakovanieexperimentu v jednomdokumente

  3. Rychly uvod do jazyka R Datovetypy: Character, Numeric, Integer, Logical Zlozeneobjekty: Vector, Matrix, Data frame, List, Factor Operacie: Subsetting, Logical Subsetting

  4. Zlozeneobjekty Vector (aka. pole): heights <- c(188.2, 181.3, 193.4) heights ## [1] 188.2 181.3 193.4 List (aka. asociativne pole): vector1 <- c(188.2, 181.3, 193.4) vector2 <- c("jeff", "roger", "andrew", "brian") myList <- list(heights=vector1, firstNames=vector2) myList ## $heights ## [1] 188.2 181.3 193.4 ## ## $firstNames ## [1] "jeff" "roger" "andrew" "brian"

  5. Zlozeneobjekty 2 Matrix: myMatrix = matrix(c(1, 2, 3, 4), byrow=T, nrow=2) myMatrix ## [,1] [,2] ## [1,] 1 2 ## [2,] 3 4

  6. Zlozeneobjekty 3 Data frame (aka. tabulka): vector1 = c(188.2, 181.3, 193.4, 192.3) vector2 = c("jeff", "roger", "andrew", "brian") myDataFrame= data.frame(heights=vector1, firstNames=vector2) MyDataFrame ## heights firstNames ## 1 188.2 jeff ## 2 181.3 roger ## 3 193.4 andrew ## 4 192.3 brian

  7. Subsetting vector1 = c(188.2, 181.3, 193.4, 192.3) vector2 = c("jeff", "roger", "andrew", "brian") myDataFrame = data.frame(heights=vector1, firstNames=vector2) vector1[1] ## [1] 188.2 vector1[c(1,2,4)] ## [1] 188.2 181.3 192.3

  8. Subsetting 2 myDataFrame[1,1:2] ## heights firstNames ## 1 188.2 jeff myDataFrame$firstNames ## [1] jeff roger andrewbrian ## Levels: andrewbrianjeff roger

  9. Logical subsetting myDataFrame[myDataFrame$firstNames == "jeff", ] ## heights firstNames ## 1 188.2 jeff myDataFrame$firstNames == "jeff" ## [1] TRUE FALSE FALSE FALSE myDataFrame[heights < 190, ] ## heights firstNames ## 1 188.2 jeff ## 2 181.3 roger ## 4 192.3 brian

  10. Hands on Priklad s pouzitimjazyka R naanalyzu a kniznice KNITR nagenerovaniereportu o priebehuanalyzy

  11. Odkazy Data http://blog.yhathq.com/posts/recommender-system-in-r.html http://www.ratebeer.com/beer/brewers/ RStudio http://www.rstudio.com/ Knitr (nastrojnagenerovaniereportov) http://yihui.name/knitr/ R https://class.coursera.org/compdata-003/class http://www.r-podcast.org/r-resources/

More Related