Difference between revisions of "R: Melihat Informasi dari data set"

From OnnoWiki
Jump to navigation Jump to search
(Created page with " Getting Information on a Dataset There are a number of functions for listing the contents of an object or dataset. # list objects in the working environment ls() # lis...")
 
 
Line 1: Line 1:
 
+
Berikut adalah beberapa fungsi untuk melihat content sebuah object / dataset
 
 
Getting Information on a Dataset
 
 
 
There are a number of functions for listing the contents of an object or dataset.
 
  
 
  # list objects in the working environment
 
  # list objects in the working environment
Line 31: Line 27:
 
  # print last 5 rows of mydata
 
  # print last 5 rows of mydata
 
  tail(mydata, n=5)
 
  tail(mydata, n=5)
 +
 +
 +
==Pranala Menarik==
 +
 +
* [[R]]

Latest revision as of 08:07, 5 November 2018

Berikut adalah beberapa fungsi untuk melihat content sebuah object / dataset

# list objects in the working environment
ls()
# list the variables in mydata
names(mydata)
# list the structure of mydata
str(mydata)
# list levels of factor v1 in mydata
levels(mydata$v1)
# dimensions of an object
dim(object)
# class of an object (numeric, matrix, data frame, etc)
class(object)
# print mydata
mydata
# print first 10 rows of mydata
head(mydata, n=10)
# print last 5 rows of mydata
tail(mydata, n=5)


Pranala Menarik