I am working on R and this command is not working. Any help in doing it right
vendor1<-vendor1[order(-vendor1$x),,drop=FALSE]
I keep getting this error message
Error: object 'vendor1' not found
I am working on R and this command is not working. Any help in doing it right
vendor1<-vendor1[order(-vendor1$x),,drop=FALSE]
I keep getting this error message
Error: object 'vendor1' not found
Since the error is that vendor1 cannot be found, the cause of the problem is probably earlier in your code when you create vendor1. Where does vendor1 come from? Can you show that code and its result?
When I type > vendor 1, I get the following
Version:1.0 StartHTML:0000000107 EndHTML:0000001240 StartFragment:0000000127 EndFragment:0000001222
VENDNO x 1 1101 1134.00 2 1553 2239929.82 3 1652 5472.00 4 2416 190359.30 5 3777 914640.00 6 4221 393106.75 7 5006 48403.80 8 6122 5515.20 9 7701 12041.73 10 8010 22822.98 11 9999 1208.82
11 obs of 2 variables
Vendor1 <- aggregate(data$ ORDPRCE, by=list(VENDNO=data$VENDNO), FUN=sum) works fine
Then I type
vendor1<-vendor1[order(-vendor1$x),,drop=FALSE]
Error: object 'vendor1' not found
am trying to Determine the total dollar amount ordered from each vendor. What companies are the three largest vendors by dollar amount?
Vendor1 <- aggregate(data$ ORDPRCE, by=list(VENDNO=data$VENDNO), FUN=sum) works fine
is it a typo only here in the forum post that you capitalised V of vendor1 , or is it capitalised in the code also?
Thank you for your observation. Your question actually helped me found the solution
It turns out that V is capitalized and I went and capitalized all v and it worked.
great
some programming languages ignore capitalisation, R is not one of those !
Thank you very much for your input
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.