[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-571698-105":3,"detail-sidebar-cat-1-en-105":81,"doc-detail-571698-en":127},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","rstudio-cheat-sheet-by-adela-vrtkova-and-martina-litschmannova","RStudio Cheat Sheet - by Adela Vrtkova and Martina Litschmannova","","RStudio Cheat Sheet by Adela Vrtkova and Martina Litschmannova provides a compact reference for common RStudio and R tasks. It covers workspace basics (help, setwd, package installation, library loading), data import from CSV and Excel, data transformation to data.frame and standard matrices, and handling missing values. It also summarizes EDA workflows, probability distribution functions (discrete, continuous), and key statistical inference tests for one or two variables, including confidence intervals and hypothesis testing.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/template/","Template",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/template/presentations/","Presentations",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/template/rstudio-cheat-sheet-by-adela-vrtkova-and-martina-litschmannova/571698/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/rstudio-cheat-sheet-by-adela-vrtkova-and-martina-litschmannova/571698.png","ImageObject",442,249,{"name":42,"@type":43},"Liam","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"How do I set the working directory and get help for a function in RStudio?","Question",{"text":63,"@type":64},"Use getwd() to view the current working directory and setwd(\"...\") to set it. For help on a function like boxplot, use the ?boxplot command.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What commands are used to import data from CSV and Excel?",{"text":68,"@type":64},"For CSV, use read.csv2(\"path/to/file.csv\") and assign it to a variable. For Excel, use readWorkbook(\"path/to/file.xlsx\", sheet=1, startRow=4, colNames=TRUE, cols=2:9) (with the openxlsx package).",{"name":70,"@type":61,"acceptedAnswer":71},"Which tests are included for statistical inference with one variable and how are results interpreted?",{"text":72,"@type":64},"The sheet lists Shapiro-Wilk (shapiro.test), variance inference (varTest and one-sample Chi-squared on variance), mean inference (t.test), median inference (wilcox.test), and one-sample Binomial tests (binom.test). It provides confidence interval generation alongside hypothesis testing settings.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},571698,1792014117,{"code":4,"msg":82,"data":83},"success",[84,88,93,98,103,108,113,118,123],{"id":85,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":86,"slug":87},11,90,"presentations",{"id":89,"doc_module":22,"doc_module_name":25,"category_name":90,"show_sort_weight":91,"slug":92},12,"Resumes",80,"resumes",{"id":94,"doc_module":22,"doc_module_name":25,"category_name":95,"show_sort_weight":96,"slug":97},14,"Invoices",70,"invoices",{"id":99,"doc_module":22,"doc_module_name":25,"category_name":100,"show_sort_weight":101,"slug":102},15,"Posters",60,"posters",{"id":104,"doc_module":22,"doc_module_name":25,"category_name":105,"show_sort_weight":106,"slug":107},16,"Social Media",50,"social-media",{"id":109,"doc_module":22,"doc_module_name":25,"category_name":110,"show_sort_weight":111,"slug":112},17,"Forms",40,"forms",{"id":114,"doc_module":22,"doc_module_name":25,"category_name":115,"show_sort_weight":116,"slug":117},18,"Letters",30,"letters",{"id":119,"doc_module":22,"doc_module_name":25,"category_name":120,"show_sort_weight":121,"slug":122},21,"Paper Templates",5,"papers-templates",{"id":124,"doc_module":22,"doc_module_name":25,"category_name":125,"show_sort_weight":4,"slug":126},158,"General","general-158",{"code":4,"msg":82,"data":128},{"doc_id":79,"user_id":129,"nickname":42,"user_avatar":130,"doc_module":22,"category_id":85,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":26,"language":136,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":12,"update_tm":140,"read_time":22},8796095461564,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","RStudio Cheat Sheet  \nby Adela Vrtkova and Martina Litschmannova, Department of Applied Mathematics, FEECS, V➆B-TUO via [cheatography.com](cheatography.com)  \n\n| Workspace, Using libraries |  |  |  |  |\n| --- | --- | --- | --- | --- |\n| ?boxplot\u003Cbr> getting help documentation for function boxplot |  |  |  |  |\n| getwd() |  |  |  |  |\n|  returning the current working directory |  |  |  |  |\n| setwd(\"C:/Users/RStudio\")\u003Cbr> setting the working directory to speci✜ed ✜le |  |  |  |  |\n| install.packages(\"packageZ\") |  |  |  |  |\n|  downloading and installing a package called packageZ |  |  |  |  |\n| library(packageZ)\u003Cbr> activating already installed package called packageZ |  |  |  |  |\n| packageZ::functionF(x) |  |  |  |  |\n|  calling function functionF from speci✜ed package packageZ |  |  |  |  |\n| moments, EnvStats, dunn. test, lsr, openxlsx, car, epiR\u003Cbr> important packages |  |  |  |  |\n| \\# After the hash, I can write whatever. |  |  |  |  |\n|  writing notes into the script |  |  |  |  |\n|  |  |  |  |  |\n| Importing data |  |  |  |  |\n| data = read.csv2(\"C:/Users/RStudio/data.csv\")\u003Cbr> importing data in csv from speci✜ed ✜le and saving as data |  |  |  |  |\n| data = read.csv2(\"[http://am-nas.vsb.cz/DATA/dataset.csv](http://am-nas.vsb.cz/DATA/dataset.csv)\") |  |  |  |  |\n|  importing data in csv from the internet and saving as data |  |  |  |  |\n| data = readWorkbook(\"C:/USER/DATA/dataset.xlsx\", sheet=1, startRow=4, colNames=TRUE, cols=2:9) \\# openxlsx package  importing data in xlsx |  |  |  |  |\n|  |  |  |  |  |\n| Working with data |  |  |  |  |\n| data = as.data.frame(data)\u003Cbr> saving imported data as an object of class data.frame |  |  |  |  |\n| data.S = stack(data) |  |  |  |  |\n|  transferring data table into the standard data matrix |  |  |  |  |\n| data.S.omit = na.omit(data.S)\u003Cbr> omitting entire rows with missing values (NAs) |  |  |  |  |\n|  |  |  |  |  |\n| Probability distribution-Pre✜xes |  |  |  |  |\n| r- | generating random | numbers from | the distribution |  |\n| d- | probability density P (X = x) | function f (x) | or probability mass | function |\n| p- | P (X ≤ x) |  |  |  |\n| q- | quantile function |  |  |  |\n|  |  |  |  |  |\n| Probability distribution-Discrete |  |  |  |  |\n| -binom | Binomial distribution Bi (n; 􀀙) |  |  |  |\n| -hyper | \u003Cbr>Hypergeometric distribution H (N; M; n)! R code requires-H (M; N − M; n) |  |  |  |\n| -nbinom | Negative binomial distribution NB (k; 􀀙)\u003Cbr>! de✜nition in JASP/R-number of unsuccessful trials |  |  |  |\n| -pois | \u003Cbr>Poission distribution Po (􀀕t) |  |  |  |\n|  |  |  |  |  |\n| Probability distribution-Continuous |  |  |  |  |\n| -unif | Uniform distribution U (a; b) |  |  |  |\n| -exp | \u003Cbr>Exponential distribution Exp (􀀕) |  |  |  |\n| -norm | Normal distribution N (􀀖; 􀀛2 )\u003Cbr>! JASP applet Distributions requires N(􀀖; 􀀛2 )\u003Cbr>! R code requires-N (􀀖; 􀀛) |  |  |  |\n\n| EDA for a Qualitative Variable |  |\n| --- | --- |\n| data$group = as.factor(data$group)\u003Cbr> rede✜ning group variable as factor |  |\n| table(data$group) |  |\n|  frequency table |  |\n| barplot(table(data$group))\u003Cbr> creating a bar plot |  |\n| pie(table(data$group)) |  |\n|  creating a pie chart |  |\n|  |  |\n| EDA for a Quantitative Variable |  |\n| summary(data$values) | summary statistics |\n| length(data$values) | sample size (attention if NAs present) |\n| min(data$values) | minimum |\n| mean(data$values) | arithmetic mean |\n| quantile(data$values,probs=0.3) | 30% quantile |\n| max(data$values) | maximum |\n| sd(data$values) | standard deviation |\n| var(data$values) | variance |\n| moments::skewness(data$values) | skewness |\n| moments::kurtosis(data$values)-3 | kurtosis |\n| boxplot(data$values) | boxplot |\n| hist(data$values) | histogram |\n| plot(density(data$values)) | plotting kernel density estimation |\n| qqnorm(data$values); qqline(data$values) | QQ-plot |\n|  |  |\n| Function tapply() |  |\n| tapply(dataS$values, dataS$group, mean)\u003Cbr> calculates the mean for values by group in data |  |\n| tapply(dataS$values, dataS$gro","cbCairFSJtWLUM5J","https://ap.wps.com/l/cbCairFSJtWLUM5J","pdf",124371,"English","# Workspace, Using libraries\n# Importing data\n# Working with data\n# Probability distribution-PreFxes\n# Probability distribution-Discrete\n# Probability distribution-Continuous\n# EDA for a Qualitative Variable\n# EDA for a Quantitative Variable\n# Function tapply()\n# Statistical inference-One variable\n# Statistical inference-Two variables","[{\"question\":\"How do I set the working directory and get help for a function in RStudio?\",\"answer\":\"Use getwd() to view the current working directory and setwd(\\\"...\\\") to set it. For help on a function like boxplot, use the ?boxplot command.\"},{\"question\":\"What commands are used to import data from CSV and Excel?\",\"answer\":\"For CSV, use read.csv2(\\\"path/to/file.csv\\\") and assign it to a variable. For Excel, use readWorkbook(\\\"path/to/file.xlsx\\\", sheet=1, startRow=4, colNames=TRUE, cols=2:9) (with the openxlsx package).\"},{\"question\":\"Which tests are included for statistical inference with one variable and how are results interpreted?\",\"answer\":\"The sheet lists Shapiro-Wilk (shapiro.test), variance inference (varTest and one-sample Chi-squared on variance), mean inference (t.test), median inference (wilcox.test), and one-sample Binomial tests (binom.test). It provides confidence interval generation alongside hypothesis testing settings.\"}]","RStudio Cheat Sheet - by Adela Vrtkova and Martina Litschmannova | PDF",1791923173]