Displaying 1 result from an estimated 1 matches for "df_without_char".
2005 Mar 17
1
Binding one column of characters into a dataframe factors other numeric columns
...ric columns get factored in the data
frame, which makes it tough to call those columns for calculations later on.
I've tried using AsIs to prevent this, but without luck...in the examples
below, the object named "c" is the one that is the character column. The
others are numeric.
df_without_char <- data.frame(cbind(rl, gl, cp), row.names = rownames(r))
#without char vector
df_without_char <- data.frame(cbind(rl, gl, c, cp), row.names =
rownames(r))#with char vector
df <- data.frame(cbind(rl, gl, I(c), cp), row.names = rownames(r)) #try to
keep char vector AsIs
df <- data....