You can use the str function to figure out the data type of the output data:
str()
From utils v3.6.1
by R-core [email protected]
Compactly Display The Structure Of An Arbitrary R Object
Compactly display the internal structure of an R object, a diagnostic function and an alternative to summary (and to some extent, dput). Ideally, only one line for each ‘basic’ structure is displayed. It is especially well suited to compactly display the (abbreviated) contents of (possibly nested) lists. The idea is to give reasonable output for any R object. It calls args for (non-primitive) function objects.
For example:
d <- rnorm(100)
df <- data.frame(y=d,x=1)
str(df)
'data.frame': 100 obs. of 2 variables:
$ y: num -0.12 1.013 -0.201 -2.038 -0.196 ...
$ x: num 1 1 1 1 1 1 1 1 1 1 ...
Other functions to determine the type of output:
typeof()
The Type Of An Object
typeof determines the (R internal) type or storage-mode of any object.
class(obj)
sapply(obj, class)
sapply(obj, attributes)
attributes(obj)
names(obj)