Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Creating a dataset > Useful functions for working with data objects

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.3).

Table 2.3. Useful functions for working with data objects
FunctionPurpose
length(object)Number of elements/components.
dim(object)Dimensions of an object.
str(object)Structure of an object.
class(object)Class or type of an object.
mode(object)How an object is stored.
names(object)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.
objectPrints the object.
head(object)Lists the first part of the object.
tail(object)Lists the last part of the object.
Is()Lists current objects.
rm(object, object, ...)Deletes one or more objects. The statement rm(list = Is()) will remove most objects from the working environment.
newobject <- edit(object)Edits object and saves as newobject.
fix(object)Edits in place.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial