similar to: ifelse problem

Displaying 20 results from an estimated 3000 matches similar to: "ifelse problem"

2009 Nov 18
3
Re ading multiple Excel 2007 files with a loop
I have several hundred Excel 2007 data files in a folder. I would like to read every file in a single given folder using a loop. I have searched the FAQ, the forum archives here, other or older R boards and the R Import / Export documentation, and have asked some very knowledgeable R users without learning of a solution. I hope someone here can help. I understand that the most common
2009 Sep 24
2
RODBC problem
Hi, I'm attempting to use the RODBC package on Windows Vista to import an excel spreadsheet. The spreadsheet has three worksheets the last of which is blank. Following an example in Phil Spector's book (p. 34), after creating a connection named con I did the following: > con RODBC Connection 3 Details: case=nochange DBQ=c:\temp\test.xls DefaultDir=c:\temp
2014 Aug 14
3
leer ficheros excel en R en Ubuntu
Hola, Pensé que esto iba a ser trivial en R, pero me estoy encontrado muchos con mi problema en internet, y que las soluciones ofrecidas no terminan de funcionar. Estoy intentando leer un fichero .xls en ubuntu con los siguientes paquetes y nada: require(RODBC) conn = odbcConnectExcel("madrid.xls") # open a connection to the Excel file sqlTables(conn)$TABLE_NAME # show all sheets df =
2006 Jul 12
1
RODBC, missing values, and Excel
Hi, all, I'm trying to use RODBC to read data from Excel. However, I'm having trouble converting missing values to NA and rather perplexed by the output. Below illustrates my problem: ## DATA - copy to Excel and save as "tmp.xls" ## tmp.xls!Sheet1 x 0.11 0.11 na na na 0.11 ## tmp.xls!Sheet2 x 0.11 0.11 na na na na 0.11 ## R Code read.xls <- function(file, sheet =
2013 Aug 22
1
Rexcel
Hello, I must tell you once again to address your questions to r-help at r-project.org And since there was no subject line, I've made up one. Your question seems to be a question about excel, and I really can't help you. Maybe someone else can. But if you write.table(etszP) can't you read that file into excel? Rui Barradas Em 22-08-2013 15:57, siddhartha.geddam at eclerx.com
2012 Feb 08
2
Problems reading tab-delim files using read.table and read.delim
Hello, I used read.xlsx to read in Excel files but for large files it turned out to be not very efficient. For that reason I use a programme which writes each sheet in an Excel file into tab-delim txt files. After that I tried using read.table and read.delim to read in those txt files. Unfortunately, the results are not as expected. To show you what I mean I created a tiny Excel sheet with some
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
2014 Aug 15
2
leer ficheros excel en R en Ubuntu
Gracias Jorge por contestar tan rápido. Con gdata hago eso del path, y directamente con el fichero, lo vi en una web, y he intentado todas las opcioens que he visto. En vez de install.packages('rJava', type = 'source') he hecho install.packages('rJava') Ahora probaré, y lo mismo con scan y readLines. He visto en stackoverflow que mi problema puede ser actualizar java,
2014 Aug 15
2
leer ficheros excel en R en Ubuntu
offline? te lo envío a tu email, pq no creo que a toda la lista sea buena idea. El 15 de agosto de 2014, 9:47, Jorge I Velez <jorgeivanvelez en gmail.com> escribió: > De nada, Miguel. Es posible que me envies el archivo offline? --JIV > > > > 2014-08-15 17:45 GMT+10:00 Miguel Fiandor Gutiérrez < > miguel.fiandor.gutierrez en gmail.com>: > > Gracias
2014 Aug 15
5
leer ficheros excel en R en Ubuntu
Hola, @javier, me gustaría no tener que hacer nada de forma manual, ni por fuera de r, rstudio. Es decir, el típico comando de linux que me convierta de xls a csv prefiero no usarlo. Me gustaría hacerlo todo desde R. @jorge -> Con RODBC me salta -> Error: could not find function "odbcConnectExcel" Lo que creo que es inevitable en Ubuntu
2012 Mar 15
2
Importing multiple worksheets from one Excle/ csv file into R
Dear R experts, I am trying to import some data from some Excle files into R. My Excle file contains about 50 sheets. One solution I can think about is to convert my Excle file into csv file first and then load data into R using 'read.csv'. But it seems to me that 'read.csv' only supports reading one sheet (or 'one file') each time, so that seems I have to create 50 csv
2012 Dec 13
2
How to create multiple country's data into multiple sheets of one excel
HI, I have large dataset of many countries. I have written the program to run through each country to generate one output for each country. I want to put the output like this: one sheet has output for one country. How do I achieve it by r. I have tried this: library(xlsx) write.xlsx(nnn, "vn.xlsx", sheetName="Sheet1") [1] but when I change sheetName="Sheet2"
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
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
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,
2013 Mar 28
2
How to search in each excel in my working dir and extract part information of one product in each country?
Hello, I have created many excel files in my working dir. each excel file contain one country's data. In the excel, I have dataframe in sheet1, where each product and its relative information is in each row as following: Product PE Retail_price_Band Country Model_Fit A -2.5 0-50 CN 84% B -2.1 51-100
2013 Oct 10
12
What's the best way to approach reading and parse large XLSX files?
Hello, I''m developing an app that basically, receives a 10MB or less XLSX files with +30000 rows or so, and another XLSX file with about 200rows, I have to read one row of the smallest file, look it up on the largest file and write data from both files to a new one. I just did a test reading a few rows from the largest file using ROO (Spreadsheet doesn''t support XSLX and
2003 Jul 21
1
RODBC: problem saving a new table in an "Excel database"
Hi I am using package RODBC version 1.0-1 under R version 1.7.1 on Windows XP Pro. I am having problems writing a new table to an (Excel) database using sqlSave. I connect to an empty Excel spreadsheet using odbcConnectExcel (which, I believe, uses the Microsoft Excel Driver DSN). Then I try and save a new table to the database(spreadsheet) using SqlSave, but obtain an error message. Below is
2005 Sep 28
1
Errors in odbcConnectExcel()
Dear R-help I would like to read Excel Spreadsheets using odbcConnectExcel() in RODBC, but data in the first row can not be read. For example, I tried to read Excel file 'Book1.xls' in the current Work Directory with the following data (Range("A1:B5") in Excel), 1 19 2 27 3 61 4 76 5 98 My commands and the result are as follows. > library(RODBC) > Book1 <-
2005 Jun 08
1
RODBC question: problem importing series with blank cells
Hello, I have an excel file that I load through RODBC. Some of my columns are blank. They are equity time series and the stocks did not exist at the earlier dates. My problem is that the whole column becomes <NA> even though there are numbers at later dates. Here's my excel file http://www.tradebit.com/download.php/35699 <http://www.tradebit.com/download.php/35699> And