Thank you for teh helpful answer. I do have one aother related
question; If I am not interested in teh result of the lapply, as I am
using it instaid of a for loop, example
lapply(df, function(r) sqlQuery(conn, paste("insert into t
values(",r['a'],',',r['b'],')')))
and I am not interested in teh
apply transorm your data.frame into a matrix which can contains only one
type of values (character or numeric or logical).
data.frame are list, so they can contain various kind of data, and a
solution to your problem is given by lapply:
> b=lapply(df, function(r) print(class(r['a'])))
[1] "nume
Numeric data that is part of a mixed type data frame is converted into
character. How can I tell apply to maintain the original class of a
column and not convert it into character. I would like to do this of
the vector and not inside the apply function individually over each
element. Consider the f