Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Reading Data into R by Kazuki Yoshida 2549 views
- Text Mining Infrastructure in R by Ashraf Uddin 14687 views
- hands on: Text Mining With R by Jahnab Kumar Deka 937 views
- Social media analysis in R using tw... by Mohd Shadab Alam 4044 views
- Text Mining with R -- an Analysis o... by Yanchang Zhao 56694 views

973 views

Published on

R Datatypes

No Downloads

Total views

973

On SlideShare

0

From Embeds

0

Number of Embeds

79

Shares

0

Downloads

0

Comments

0

Likes

1

No embeds

No notes for slide

- 1. Data Objects<br />The Dataminingtools.net Team<br />
- 2. Data Types<br />R supports the following data types:<br />Numbers<br />Strings<br />Factors<br />Data Frames<br />Tables<br />One Way Tables<br />Two Way Tables<br />
- 3. Numbers<br />The "<-" tells R to take the number to the right of the symbol and store it in a variable whose name is given on the left. The "=" symbol can also be used.<br />
- 4. Strings<br />> a <- "hello world" <br />> a [1] "hello world" <br />> b <- c("hello", “two") <br />> b [1] "hello" “two" <br />> b[1] [1] "hello" <br />Strings can be stored in variables just like numbers!<br />
- 5. Factors<br />A factor is a vector object used to specify a discrete classification (grouping) of the components of other vectors of the same length. There are two kinds of factors supported:<br />Ordered<br />Unordered<br />
- 6. Factors<br />Factors can be defined like this:<br />
- 7. Lists & Data Frames<br />A list is an object consisting of an ordered collection of objects known as its components. There is no particular need for the components to be of the same mode or type, and, for example, a list could consist of a numeric vector, a logical value, a matrix, a complex vector, a character array or a function.<br />
- 8. Lists & Data Frames<br />Defining a list:<br />
- 9. Lists & Data Frames<br />A data frame is a list with class "data.frame". For a list to be a data frame:<br />The components must be vectors (numeric, character, or logical), factors, numeric matrices, lists, or other data frames.<br />Matrices, lists, and data frames provide as many variables to the new data frame as they have columns, elements, or variables, respectively.<br />Numeric vectors, logicals and factors are included as is, and character vectors are coerced to be factors, whose levels are the unique values appearing in the vector.<br />Vector structures appearing as variables of the data frame must all have the same length, and matrix structures must all have the same row size.<br />
- 10. Tables<br /> The function table() allows frequency tables to be calculated from equal length factors. If there are k factor arguments, the result is a k-way array of frequencies.<br />
- 11. Tables<br />

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment