Learn R Programming

expss (version 0.8.7)

sheet: Make data.frame without conversion to factors and without fixing names

Description

sheet and as.sheet are shortcuts to data.frame and as.data.frame with stringsAsFactors = FALSE, check.names = FALSE. lst creates list with names. .sheet, .lst the same as above but work in the scope of default dataset.

Usage

sheet(...)

as.sheet(x, ...)

dtfrm(...)

as.dtfrm(x, ...)

lst(...)

.dtfrm(...)

.sheet(...)

.lst(...)

Arguments

...

objects, possibly named

x

object to be coerced to data.frame

Value

data.frame/list

See Also

default_dataset, data.frame, as.data.frame, list

Examples

Run this code
# NOT RUN {
# see the difference
df1 = data.frame(a = letters[1:3], "This is my long name" = 1:3)
df2 = sheet(a = letters[1:3], "This is my long name" = 1:3)

str(df1)
str(df2)

# lst
a = 1:3
b = 3:1

list1 = list(a, b)
list2 = lst(a, b)

str(list1)
str(list2)

data(iris)
default_dataset(iris)

.sheet(Sepal.Width,  Sepal.Length)
.lst(Sepal.Width,  Sepal.Length)

# }

Run the code above in your browser using DataLab