Hi all, I am trying to add a new column to each data frame of a list
with the results of adding the first two columns. I am trying to do this
with sqldf, but I have not been successful. I am using SQLite as my
driver.
This is the code that I have:
q10 = paste("ALTER TABLE getratingsmore[[1]] ADD newx AFTER x")
q11 = paste("UPDATE TABLE getratingsmore[[1]] SET newx = x+shift")
sqldf('q10, qll')
For a reproducible example, I have the following code (which also was
not successful):
dput(df)
structure(list(a = c(5, 6, 6), b = c(20.2, 32.9, 0.99), cdo = c(0.2,
32, 90.34)), .Names = c("a", "b", "cdo"),
row.names = c(NA, -3L
), class = "data.frame")
q10 = paste("ALTER TABLE df ADD newx AFTER b")
q11 = paste("UPDATE TABLE df SET newx = a+0.9")
sqldf(q10, qll)
R result: NULL
Thank you.
Irucka Embry
<span id=m2wTl><p><font face="Arial, Helvetica,
sans-serif" size="2"
style="font-size:13.5px">_______________________________________________________________<BR>Get
the Free email that has everyone talking at <a href=http://www.mail2world.com
target=new>http://www.mail2world.com</a><br> <font
color=#999999>Unlimited Email Storage – POP3 – Calendar
– SMS – Translator – Much
More!</font></font></span>
[[alternative HTML version deleted]]