[R] Why the result is coming as NULL?

2012-08-01 Thread Sri krishna Devarayalu Balanagu
Why the result is coming as NULL. Can anyone help. I want to find the outliers for a reference setwd(D:/AZ) library(RODBC) cdb_cnct - odbcConnectExcel(Book1.xls) cdb_frame - sqlFetch(cdb_cnct, Sheet1) odbcClose(cdb_cnct) rm(cdb_cnct) x- cdb_frame$Publication =1990 cdb_frame$Publication =2012

Re: [R] Why the result is coming as NULL?

2012-08-01 Thread Julien Moeys
Not sure, but maybe check the name of the column(s) you are retrieving you may get a NULL value if the column name is misspelled R example: ## -- df - data.frame( Publication = 1991:2000, Reference = LETTERS[1:10] ) df[ 2, References ] # NULL

Re: [R] Why the result is coming as NULL?

2012-08-01 Thread Jessica Streicher
I assume result means the invalid variable. works with sample data frame i made, so please provide an example of cdb_frame. You can use dput(cdb_frame) for that, or dput(head(cdb_frame)) if you have a lot of data. For example it could be that $Publication is a string, not numeric. On