Get Value of Data Element without Name or Index in R | Double Square Brackets, as.vector & as.double

0
33

How to transmit only the value of a data table element without showing the name or index in the R programming language. More details:
R code of this video:

set.seed(872634) # Create example table
data <- table(sample(letters[1:5], 100, replace = TRUE))

data[3] # Return element of table with name

data[[3]] # Return element of table without name

as.vector(data[3]) # Return element of table without name

as.double(data[3]) # Return element of table without name

Follow me on Social Media:
Facebook:
LinkedIn:
Reddit:
Twitter:

source

LEAVE A REPLY

Please enter your comment!
Please enter your name here