Skip to Content
R Programming Fundamentals
book

R Programming Fundamentals

by Kaelen Medeiros
September 2018
Beginner
206 pages
4h 27m
English
Packt Publishing
Content preview from R Programming Fundamentals

Activity: Identifying Variable Classes and Types

Scenario

You need to write some code for classifying the data correctly for easy report generation. The following is the provided data:

Variable Class Type
"John Smith"
16
10L
3.92
-10
"03-28-02"
as.Date("02-03-28")

 

Aim

To identify different classes and types of data in R.

Prerequisites

A pencil or pen, plus RStudio and R installed on your machine.

Steps for completion

  1. Fill in the table provided with the class and type of each variable.
  2. Use the class() or typeof() functions if you get stuck, but first try and fill it in without the code!
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Programming Fundamentals

R Programming Fundamentals

Samik Sen, Marcin Dubel
Python for Programmers

Python for Programmers

Paul Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781789612998Supplemental Content