R
R is a programming language specialized in statistics, designed from the ground up for data processing, analysis, and visualization. It’s difficult to compare its complexity to other statistical packages, but in terms of implementing statistics, it undoubtedly holds an unrivaled position and status. Since 2020, efforts have been made to popularize Julia, but there are aspects of practical statistical analysis where R is hard to replace, hence the continued support and enhancement of R content is planned.
Tutorial
Errors
- Solving the ‘unexpected else in else’ Error when Using the
else if
Statement - Resolving ‘Warning in install.packages: lib = CProgram FilesRR-361library is not writable’ When Installing Packages
- Fixing the Error: ‘C:\U’ used without hex digits in character string starting ‘C:\U’ When Reading Files or Changing Paths
Tips
- Removing All Variables, Clearing Console Window
- Removing Limit on Number of Digits Displayed
- Checking Current OS Information with
Sys.info()
- Checking Current Date and Time with
Sys.Date()
,Sys.time()
- Defining the Modulo Operator %%
- Using the Pipe Operator %>%,
- Measuring Code Execution Time, Benchmarking with
system.time()
- Parallel Processing
- Getting a List of Files in a Directory with
list.files()
Data Processing
- Loading Built-in Datasets
- Importing External Data
- Converting Numeric Values in Categorical Data to Numeric Data
- Removing NA Values
- Handling Strings
- Filtering Data Conditionally
- Exploring Data Structures with
str()
- Comparing Elements of Two Arrays with
%in%
,intersect()
,setdiff()
- Standardizing Data, Viewing Standardized Residuals with
rstudent()
- Finding Positions of Maximum and Minimum Values with
which()
- Referencing Metadata, Attributes with
attr()
Lists and Data Frames
- Various Ways to Reference Lists
- Decomposing Lists, Removing Duplicate Elements with
unlist()
,unique()
- Sorting Data Frames by Columns
- Transposing Rows and Columns in Data Frames
- Renaming Columns and Rows in Data Frames with
names()
,dimnames()
- Differences in the
start
,end
Options in thets()
Function and thestart
,end
Options in thewindow()
Function
Computation
- Calculating Quotients and Remainders
- Calculating Matrix Products, Inverses, and Transposes
- Using Bootstrap Functions
- Rounding Up, Down, and to Specific Decimal Places
- Various Distribution Functions
- Calculating Conditional Sums and Averages
- Calculating Derivatives with
grad()
- Calculating Definite Integrals with
integrate()
- Working with Complex Numbers
- Calculating Jacobian and Hessian Matrices with
jacobian()
,hessian()
- Calculating Dot Products Between Vectors with
%*%
,%o%
Visualization
- Drawing Graphs with
plot()
- Drawing Horizontal and Vertical Lines with
abline()
- Adding Text to Plots with
text()
- Using Symbols in Plots with
pch
- Adding Subscripts to Axis Labels with
expression()
- Refining Histograms with
nclalss
- Adding Legends with
legend()
- Using Logarithmic Scaling with
log="xy"
- Plotting Points with Colored Borders
ggplot2
The introduction to ggplot2
remains a project to be completed.
All posts
- Using else if Statements in R: Solving the Error: unexpected else in else Issue
- Remove All Variables and Clear Console in R
- Finding Quotients and Remainders in R
- Calculating the Product, Inverse, and Transpose of a Matrix in R
- How to import built-in datasets in R
- Swapping Rows and Columns in a Data Frame in R
- Importing External Data in R
- Converting Categorical Data to Numeric Data in R
- Remove NA in R
- Removing Digit Limits in R
- How to Draw a Power Function Graph in R
- How to Use Bootstrap Functions in R
- Handling Strings in R
- Rounding Up, Down, and to a Specific Number of Digits in R
- Various Distribution Functions in R
- Computing Conditional Sums and Conditional Means in R
- How to Filter Data Conditionally in R
- Drawing Graphs in R
- How to Draw Horizontal and Vertical Lines in R
- How to Print Characters on a Plot in R
- Symbols Used in Plotting Graphs in R
- Dismantling a list in R, Removing Duplicate Elements
- Unpacking Data Structures in R
- Changing Column and Row Names in a DataFrame in R
- Comparing Elements of Two Arrays in R
- Adding Subscripts to Axis Labels in R Graphs
- How to Install R on Ubuntu
- How to Check Current OS Information in R
- How to Calculate the Derivative in R
- Calculating Definite Integrals in R
- Using Complex Numbers in R
- Calculating Jacobian and Hessian Matrices in R
- Checking the Current Date and Time in R
- Standardizing Data in R: Viewing Standardized Residuals
- How to See Histograms in More Detail in R
- Sorting Data Frames by Columns in R
- Calculating the Dot Product of Vectors in R
- Finding the Location of Maximum and Minimum Values in R
- Accessing Lists in R
- How to Concatenate a Vector of Strings into One String in R
- Referencing Metadata and attr in R
- How to Insert a Legend in R
- How to Draw a Log-Log Scale Plot in R
- How to Define the Operator %% in R
- How to Use Pipe Operator %>% in R
- How to Plot Points with Colored Borders in R
- Differences in the start and end Options of the ts Function and the window Function in R
- Measuring and Benchmarking Code Execution Time in R
- How to Parallel Process in R
- Reading Data Files Quickly in R
- Resolving Warning in install.packages lib = C:\Program Files\R\R-3.6.1\library is not writable during R Package Installation
- How to Get a List of Files in a Folder in R
- Solving Error: 'C:\U' used without hex digits in character string starting 'C:\U' when Reading R Files or Changing Paths