Programming classes
  • Unix - useful commands
  • R - useful commands
  • Karen Goncalves
Getting help
R basics
Help
You can get help about a package or function with the function help(). Just put the quoted name of the package/function inside the parenthesis.
Working with numbers
R basics
Numbers
Summarize
Functions for numeric data
Sequences and repetitions
R basics
Numbers
Use the command seq to get a sequence of numbers. You can specify the interval between every number shown. The function is writen as: seq(FROM, TO, INTERVAL)
Overview data
R basics
Summarize
See data structure. Shows number of rows and columns in a data frame, classes of the columns, first few elements of each column.
Resources
R basics
Extended reading
code{ font-size:1.1em; color:yellow; background-color:#2b2b2b; border-radius:.25rem; padding:.125rem .25rem; word-wrap:break-word } code span…
Objects and packages
R basics
To know what packages you have installed, their versions and dependencies, you can use the function installed.packages(). This returns a table with information about the…
Open files
R basics
Input files
These functions are available without loading any package
Excel files in R
R intermediary
Spreadsheets
Excel import and export
Input files
If you have only one sheet in a spreadsheet, the easiest thing to do is to save it as .csv or .txt and open it with read.XXXX or read_XXXX. Spreadsheets use more space and…
Working with text
R intermediary
Regex
Text manipulation
These are ways to search text without writing the explicitly what you are searching.
No matching items
Back to top
 

Copyright 2023, Ph.D. Karen Cristine Goncalves