Introduction to R Programming
- R Introduction
- Getting Started R
- Data Management
- Data Visualization
- One-Sample Tests
- Two-Samples Tests with Categorical Variables
- Two-Sample Tests with Numeric Variables
- Linear Regression
- Logistic Regression
Statistics Support
The Stats-TA position has been suspended for the 2023/2024 academic year. We recommend the following campus resources for statistics and math support:
Need help? Contact us
Phone: 801-581-6273
Email
In-Person
Schedule a Research Consultation
More Subject Guides
What is R & RStudio?
Installing R & RStudio
Getting Started
R Packages
An R package contains a collection of functions and datasets developed by the community. These packages can be downloaded and directly used by calling their specific function or dataset names.
How to Install an R Package
install.packages("packagename")
Upon successful download, type the following line:
library(packagename)
If you are confused about what a package does, you can use help(package = "<package_name>")
to get more information. To understand what a function does, you can use help("<function_name>")
or type ?<function_name>
or ?<package_name>
to open the "Help" window and see the R Documentation description for the package or function.
Importing Data
Importing
To import an Excel file in .xlsx or .xls format, download the "readxl" package and use the read_excel
function.
To import Stata (.dta), SPSS (.sav), and SAS (.xport) files, download the "haven" package. Use the read_dta
function for Stata, read_spss
function for SPSS, and read_xpt
function for SAS, respectively.
Exporting Data
- Last Updated: Jan 10, 2024 8:19 AM
- URL: https://campusguides.lib.utah.edu/r-programming
- Print Page