List of R functions: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
This page contains listings of some [[R]] functions and commands by category. | This page contains listings of some [[R]] functions and commands by category. | ||
== Workspace and help == | == Workspace and help == | ||
{|{{prettytable}} | {|{{prettytable}} | ||
|+ ''' | |+ '''Workspace and help''' | ||
! function name | ! function name | ||
! functionality | ! functionality | ||
Line 99: | Line 43: | ||
| quit R | | quit R | ||
|} | |} | ||
== Objects == | |||
{|{{prettytable}} | |||
|+ '''Objects''' | |||
! function name | |||
! functionality | |||
|----- | |||
| mode(x) | |||
| mode of ''x'' | |||
|----- | |||
| ls(), objects() | |||
| list objects in memory | |||
|----- | |||
| rm(x), rm(list = ls()) | |||
| remove ''x'' or all objects | |||
|----- | |||
| exists(x) | |||
| test if object ''x'' exists in memory | |||
|----- | |||
| as.numeric(x), as.list(x), ... | |||
| coerce mode of object ''x'' | |||
|----- | |||
| is.numeric(x), is.na(x), ... | |||
| test mode of object ''x'' | |||
|----- | |||
| identical(x, y) | |||
| test if objects are identical | |||
|----- | |||
| return(invisible(x)) | |||
| return invisible copy (doesn't print) | |||
|} | |||
== Packages == | |||
{|{{prettytable}} | |||
|+ '''Packages''' | |||
! function name | |||
! functionality | |||
|----- | |||
| install.packages(name) | |||
| download and install package ''name'' | |||
|----- | |||
| download.packages(name, dir) | |||
| download package ''name'' into ''dir'' | |||
|----- | |||
| library(name), require(name) | |||
| load package ''name'' | |||
|----- | |||
| data(name) | |||
| load dataset ''name'' | |||
|----- | |||
| .libPaths(dir) | |||
| add directory ''dir'' to library paths | |||
|----- | |||
| sessionInfo() | |||
| list loaded packages | |||
|} | |||
== Flow and control and function definition == | |||
== Statistical tests == | == Statistical tests == |
Revision as of 11:37, 3 May 2011
This page is a encyclopedia article.
The page identifier is Op_en5140 |
---|
Moderator:Nobody (see all) Click here to sign up. |
This page is a stub. You may improve it into a full page. |
Upload data
|
This page contains listings of some R functions and commands by category.
Workspace and help
function name | functionality |
---|---|
getwd() | get working directory |
setwd(dir) | set working directory to dir |
help(topic), ?topic | get help on topic, usually function name |
help.search("keyword") | search for help |
help.start() | HTML help start page |
demo() | list available demonstrations |
save(..., file), load(file) | save and load objects |
savehistory(file), loadhistory(file) | save and load command history |
source(file) | execute commands from file |
list.files(dir), dir(dir) | list files in directory dir |
q() | quit R |
Objects
function name | functionality |
---|---|
mode(x) | mode of x |
ls(), objects() | list objects in memory |
rm(x), rm(list = ls()) | remove x or all objects |
exists(x) | test if object x exists in memory |
as.numeric(x), as.list(x), ... | coerce mode of object x |
is.numeric(x), is.na(x), ... | test mode of object x |
identical(x, y) | test if objects are identical |
return(invisible(x)) | return invisible copy (doesn't print) |
Packages
function name | functionality |
---|---|
install.packages(name) | download and install package name |
download.packages(name, dir) | download package name into dir |
library(name), require(name) | load package name |
data(name) | load dataset name |
.libPaths(dir) | add directory dir to library paths |
sessionInfo() | list loaded packages |
Flow and control and function definition
Statistical tests
function name | functionality |
---|---|
t.test | en:Student's t-test |
aov | en:Analysis of variance |