concept datum object in category R

appears as: data objects
R in Action, Third Edition

This is an excerpt from Manning's book R in Action, Third Edition.

2.5       Useful functions for working with data objects

We’ll end this chapter with a brief summary of useful functions for working with data objects (see table 2.4).

Table 2.4 Useful functions for working with data objects

Function

Purpose

length(object)

Gives the number of elements/components.

dim(object)

Gives the simensions of an object.

str(object)

Gives the structure of an object.

class(object)

Gives the class of an object.

mode(object)

Determines how an object is stored.

names(object)

Gives the names of components in an object.

c(object, object,...)

Combines objects into a vector.

cbind(object, object, ...)

Combines objects as columns.

rbind(object, object, ...)

Combines objects as rows.

object

Prints an object.

head(object)

Lists the first part of an object.

tail(object)

Lists the last part of an object.

ls()

Lists current objects.

rm(object, object, ...)

Deletes one or more objects. The statement rm(list = ls()) removes most objects from the working environment.

newobject <- edit(object)

Edits object and saves it as newobject.

fix(object)

Edits an object in place.

R in Action, Second Edition: Data analysis and graphics with R

This is an excerpt from Manning's book R in Action, Second Edition: Data analysis and graphics with R.

2.5. Useful functions for working with data objects

We’ll end this chapter with a brief summary of useful functions for working with data objects (see table 2.4).

Table 2.4. Useful functions for working with data objects

Function

Purpose

length(object) Gives the number of elements/components.
dim(object) Gives the dimensions of an object.
str(object) Gives the structure of an object.
class(object) Gives the class of an object.
mode(object) Determines how an object is stored.
names(object) Gives the names of components in an object.
c(object, object,...) Combines objects into a vector.
cbind(object, object, ...) Combines objects as columns.
rbind(object, object, ...) Combines objects as rows.
object Prints an object.
head(object) Lists the first part of an object.
tail(object) Lists the last part of an object.
ls() Lists current objects.
rm(object, object, ...) Deletes one or more objects. The statement rm(list = ls()) removes most objects from the working environment.
newobject <- edit(object) Edits object and saves it as newobject.
fix(object) Edits an object in place.