similar to: Loading the stupid dataset--help!!!

Displaying 20 results from an estimated 2000 matches similar to: "Loading the stupid dataset--help!!!"

2013 Jul 16
2
Importing data by odbcConnectExcel in 64 bit
I have probably an old question. I have R.3.0.1 installed in 64 bit windows 7. The odbcConnectExcel in RODBC library does not work. Tried odbcConnectExcel2007 still does not work. Any ideas. Thanks Melissa<-sqlFetch(odbcConnectExcel2007("F:\\Cotton2012\\validation.xlsx"),sqtable = "Sheet3", + na.strings = "NA", as.is = TRUE) Error in
2005 May 24
2
reading multiple files
Dear All, How do I read in multiple data frames or matrices in a loop, e.g. for (i in 1:n) { channel <- odbcConnectExcel("filenames") file[i] <- as.data.frame(sqlFetch(channel, "sheet")) } I would like file[i] to be the name of the data.frame (i.e. file[1], file[2], file[3],...etc) rather than a vector. Thanks in advance for any help. Dave
2011 Feb 10
2
Rioja package, creating transfer function, WA, "Error in FUN"
Hi, I am a new R user and am trying to construct a palaeoenvironmental transfer function (weighted averaging method) using the package rioja. I've managed to insert the two matrices (the species abundance and the environmental data) and have assigned them to the y and x values respectively. When I try and enter the 'WA' function though, I get an 'Error in FUN' message (see
2010 Jul 22
1
64 bit use of odbcConnectExcel
Hi All, I'm using R 2.11.1 on 64 bit windows XP. The little function I wrote below I use often to import the first 1001 lines in an excel sheet to R. This works fine on the 32 bit version of R but fails on the 64 bit [both on the same machine, using the same function, importing the same .xls file]. The message from 64 bit R is: Error in sqlTables(channel1) : first argument is not an
2005 Jun 07
2
reading non-existing files
Dear all, I'm trying to read to a collection of files in a loop using odbcConnectExcel - but not all of the files exist. This is the code I have for(i in 1:no.of.subs){ channel <- odbcConnectExcel(paste(working.dir, subs[i], ".xls", sep="")) datafiles[[i]] <- as.matrix(sqlFetch(channel, "Data")) close(channel) } I'm not sure how to
2003 Mar 13
2
RODBC and Excel in Widows
Hello, I have some problems with RODBC and Excel in Win98 I am using R 1.6.2 and just upgraded RODBC to the last version on CRAN. I have an Excel file with columns Number, Name, Sex, Age, FEV1 on Sheet 1 and Number, Age, FEV1, Name, Sex on Sheet 2. Now I open the channel to the file > chan1 <- odbcConnectExcel("c:/testOdbc.xls") > tables(chan1) and the list appears with the 2
2009 Jan 31
1
FW: can't get package boot to load
Changing library(RODBC,boot) to library(RODBC) library(boot) seems to have solved the problem. _____ _____________________________________________ From: Gary Smith [mailto:gary.smith28 at comcast.net] Sent: Saturday, January 31, 2009 12:55 PM To: 'r-help at R-project.org' Subject: can't get package boot to load Hi, I am new to R and I'm totally confused by this problem.
2006 Jul 06
1
as.data.frame question
I'm using the RODBC library to read in an Excel file using the odbcConnectExcel function. I can read the Excel data prefectly, however all my character variables get converted to factors when using my.data <- as.data.frame(sqlFetch(channel, "Sheet1")) I've tried using my.data <- as.data.frame(I(sqlFetch(channel, "Sheet1"))) but this creates just
2004 Nov 09
1
colnames argument in sqlFetch backwards? (PR#7355)
Full_Name: Bert Gunter Version: 2.0.0 patched OS: Win2000 Submission from: (NULL) (192.12.78.250) The TRUE/FALSE options of the colnames argument in sqlFetch (RODBC) seem to be reversed, at least for .xls files. ## z is a connection to an xls workbook opened by odbcConnectExcel() > dat<-sqlFetch(z,'SuccessRates',colnames=FALSE) > dat[1:5,] RecID Name Run Grams Lost Run
2012 Aug 14
2
Not able to filter factor, class
After importing data from Excel through ODBC. In the inclusion dataset, class(inclusion$Value) is coming as factor. After filtering the data, length(inclusion$Value == 0),the answer is coming as 4879, but actually Value contains only 225 rows. So how can I get the length as 225. Can anyone help? setwd("D:/AZ") library("RODBC") cdb_cnct <-
2005 Jun 16
3
Excel files first row not being read
hi, i am using the RODBC package to read excel files using odbcConnectExcel and susequently sqlFetch to read the contents of the file. the file that i use is just a matrix of numbers thats all. no headers and column names. what happens is that the sqlFetch is not reading my first row of numbers. i have tried different combinations of colnames and rownames logical values but that first row is not
2010 Feb 23
1
RODBC to import/export xls files
Dear R users, I've learned today about RODBC package in order to import xls file to dataframes and export the dataframes to xls files. However I have some problems. Please excuse me if these are basic but as I said, I've just begun with this package. Also this email is quite long, but everything is related, so I don't think it would be better to split it. Moreover, there's a
2007 May 24
1
"[RODBC] ERROR: Could not SQLExecDirect"
Hi, everyone, I try to run as follows: Z>library("RODBC") Z>cnct<-odbcConnectExcel("Forbes2000.xls") Z>cnct RODB Connection 1 Details: case=nochange DBQ=C:\Program Files\R\R-2.5.0\Forbes2000.xls DefaultDir=C:\Program Files\R\R-2.5.0 Driver={Microsoft Excel Driver (*.xls)} DriverId=790 MaxBufferSize=2048 PageTimeout=5 Z>sqlQuery(cnct, "select
2005 Apr 26
2
writing a data frame in excel format
Hello I know how read a file in excel format into a R data frame using the RODBC library, but I don't know how write a R data frame in excel format. I don't understand the instructions from RODBC user manual. To read an excel file I use. library(RODBC); conex<-odbcConnectExcel("fis_quim.xls"); sqlTables(conex); data<-sqlFetch(conex,"hoja1"); Suppose I
2009 Nov 16
3
Error on reading an excel file
Hello everybody, here is the code I use to read an excel file containing two rows, one of date, the other of prices: library(RODBC) z <- odbcConnectExcel("SPX_HistoricalData.xls") datas <- sqlFetch(z,"Sheet1") close(z) It works pretty well but the only thing is that the datas stop at row 7530 and I don?t know why datas is a data frame that contains 7531 rows with the
2011 Mar 03
1
sqlFetch (RODBC) question
Dear all, I've used RODBC a lot to read in files created in MS excel and access but found a strange problem today: a variable in my data file contained both numbers and text; sqlFetch would set text within a row of numbers to NA; but if first 5 or 6 rows would be text then all numbers would be read in as NA. con<-odbcConnectExcel("xample.xls") #the file is attached or at
2011 Nov 07
1
Problema with Excel files
Hi, I have a Excel file with three spreadsheets: PlanA, PlanB and PlanC. I'm trying to read the three spreadsheets and then adding them together. But, when I try read the PlanA there is an error message: rm(list=ls()) setwd('C:/Test/Dados/Teste') require(RODBC) Arquivo = odbcConnectExcel('T070206_1347.xls') (Geral = sqlFetch(Arquivo, 'PlanA')) (Lactacao =
2009 Jul 14
2
Proper Paste for Data Member
I imported a spreadsheet into a variable sh e.g. sh$aaaa, sh$bbbb, etc... doing the following: tsSource <- ts(paste("sh$",NAMEVARIABLE,sep="") ... ) fails. The paste isn't evaluating properly. What is the proper way to concatenate a data source with a member name such that they evaluate properly. actual code below: doEnv <-
2012 Aug 01
2
Why the result is coming as NULL?
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 invalid <- cdb_frame[!x,
2003 Sep 23
1
RODBC access to MS-Excel (PR#4266)
Full_Name: Michael Hecht Version: 1.7.1 OS: WinNT Submission from: (NULL) (193.158.76.205) I've got a problem with the RODBC library while trying to access to an MS-Excel file. The Excel file was originally exportet by a commercial software, so I cannot influence it. The problem is, that the names of the tables include spaces, e.g. "Scan 1","Scan 2" etc. If I use RODBC, I