Displaying 2 results from an estimated 2 matches for "dataold".
2012 May 13
1
Help writing function in R....
...specified by their retail segment,
brand name, and type of good along with its retail price and what it
actually sold for. I need to write a function that will take these inputs
and average, count, and calculate whatever else is needed.
I have set the function up as follows (using made up data):
dataold=data.frame(segment=c("golf","tenis","football","tenis","golf","golf"),
brand=c("x","y","z","y","x","a"),type=c("iron","ball","helmet","shoe"...
2011 Apr 18
2
SQLDF syntax
Hi,
I am new to R and trying to migrate from SAS. I am trying to use sqldf to
create a new table from existed table and change some of the columns. I have
table called DataOld with columns commodity, rate and total and I am trying
to create new table called DataNew with columns commodity, ratenew and
totalNew.
> sqldf("create table datanew as select commodity, ratenew as rate * 10,
> totalnew as total *10 from DataOld")
I got error message " Error...