similar to: Importing data from MS EXCEL (.xls) to R XXXX

Displaying 20 results from an estimated 1000 matches similar to: "Importing data from MS EXCEL (.xls) to R XXXX"

2010 Dec 08
3
ReadWrite.xls problem
Dear community, I have now taken my R-file from lectures and intend to use it at home, but have a problem reading the Data from the file. I have installed and loaded the Package xlsReadWrite so far. I have also "Changed directory". This is what I have entered daten=read.xls("Daten A2") This is my Error-Message in its German original: Fehler in .Call("ReadXls",
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
2011 Oct 11
5
help to ... import the data from Excel
Hi every one ,,,, i have problem in R program to import the data from excel , I have done the following: 1. install.packages("xlsReadWrite") 2. library(xlsReadWrite) 3. z<- read.xls("ReadXls",LTS,colNames=FALSE,sheet,type,form,rowNames=FALSE) and i got on the result: Error in read.xls("ReadXls", LTS, colNames = FALSE, rowNames = FALSE) : object
2012 Mar 02
3
Memory issue. XXXX
Hi everyone, Any ideas on troubleshooting this memory issue: > d1<-read.csv("arrears.csv") Error: cannot allocate vector of size 77.3 Mb In addition: Warning messages: 1: In class(data) <- "data.frame" : Reached total allocation of 1535Mb: see help(memory.size) 2: In class(data) <- "data.frame" : Reached total allocation of 1535Mb: see
2011 Aug 27
2
Placing a column name in a variable XXXX
Hi everyone, How does one place an object name (in this case a vector name) into another object (while essentially masking the values of the first object? For example: > JOBSAT<-rnorm(40) > > CI<-function(x,alpha){ + result<-cbind(x,mean=mean(x),alpha) + print(result) + } > CI(JOBSAT,.05) I want this to return: Variable mean alpha JOBSTAT 0.02844131 0.05
2011 Nov 28
1
2 Y-AXIS labels on the same (left-hand side) Y-AXIS XXXX
Hello everyone, Is it possible to specify a 2 line y-axis label on the same lef-hand side y-axis? I am using the \n regular expression, but only the 2nd line appears (I assume the 1st line is printed off the page...) plot(PRE_SHB,R1, main="Figure 1.1: Scatterplot of Residualized Post Score", xlab = "Pre Score", ylab = "Residualized Post Score \n (Adjusted for Age
2012 Jan 17
3
Using !is.na() in a HAVING clause in sqldf() XXXX
Hi everyone, I have the following: sqldf("select Premie,count(tpounds) N,avg(tpounds) Avg_Weight, stddev_samp(tpounds) StdDev from children group by Premie having !is.na(Premie)") sqldf() does not like the !is.na(Premie) specification. How does one exclude a "missing" group in an aggregated query using sqldf()? Thanks! Dan [[alternative HTML version deleted]]
2013 Mar 25
3
Obtaining the internal integer codes of a factor XXXX
Hi everyone, I understand the process of obtaining the internal integer codes for the raw values of a factor (using as.numeric() as below), but what is the best way to obtain these codes for the levels() of a factor (since the as.numeric() results don't really make clear which code maps to which level)?
2012 Jan 04
3
Using a mathematical expression in sapply() XXXX
Hello everyone, I have the following call to sapply() and error message. Is the most efficient way to deal with this to make sum(!is.na(x)) a function in a separate line prior to this call? If not, please advise. N.Valid=sapply(x,sum(!is.na(x))) Error in match.fun(FUN) : 'sum(!is.na(x))' is not a function, character or symbol Thanks! Dan [[alternative HTML version deleted]]
2012 Mar 07
2
Remove a word from a character vector value XXXX
Hi everyone, What is the easiest way to remove the word Average and strip leading and trailing blanks from the character vector (d5.Region) below? .nrow.d5. d5.Region 1 1 Central Average 2 2 Coastal Average 3 3 East Average 4 4 Metro East Average 5 5 Metro North Average 6 6 Metro South Average 7
2012 Jan 24
2
Writing a function to return column position XXXX
Hello everyone, I am writing my own function to return the column index of all variables (these are currently character vectors) in a data frame that contain a dollar sign($). A small piece of the data look like this: can_sta can_zip ind_ite_con ind_uni_con AL 36106 $251,895.80 $22,874.43 AL 35802 $141,373.60 $7,100.00 AL 35201 $273,208.50 $18,193.66 AR 72404 $186,918.00 $25,391.00 AR
2011 Sep 01
2
Including only a subset of the levels of a factor XXXX
Hello everyone, I have the following factor: levels(pp_income) [1] "" "1" "2" "3" "4" "5" "6" "7" [9] "8" "9" "Renter" I want to subset so that only values 1:9 are included. I have the following: > income<-pp_income[pp_income %in%
2012 Jan 19
2
Reading in tab (and space) delimited data within a script XXXX
Hello everyone, I use Bob Muenchen's approach for reading in "in-stream" (to use SAS parlance) delimited data within a script. This works great: mystring <- "id,workshop,gender,q1,q2,q3,q4 1,1,f,1,1,5,1 2,2,f,2,1,4,1 3,1,f,2,2,4,3 4,2, ,3,1, ,3 5,1,m,4,5,2,4 6,2,m,5,4,5,5 7,1,m,5,3,4,4 8,2,m,4,5,5,5" mydata <- read.table( textConnection(mystring),
2011 Dec 30
2
Applyiing mode() or class() to each column of a data.frame XXXX
Hi everyone, I am attempting to use the apply() function to obtain the mode and class of each column in a data frame, however, I am encountering unexpected results. I have the following example data: v13<-1:6 v14<-c(1,2,3,3,NA,1) v15<-c("Good","Bad",NA,"Good","Bad","Bad")
2013 Oct 08
1
Summary functions in sqldf() XXXX
Hi everyone, Is it possible to obtain the 1st & 3rd quartiles & the median in a sqldf() select statement? If so, can you please provide the summary fn code? Thanks! Dan [[alternative HTML version deleted]]
2011 Nov 10
1
R package for segmentation with both continuous and categorical input variables XXXX
Hello everyone, Can anyone suggest a decently documented (with good examples in the documentation) R package/function that performs segmentation (cluster, mixture modeling) of a population using both continuous and categorical input variables? Thank you, Dan [[alternative HTML version deleted]]
2011 Jan 25
1
Importing xls from a http://
I know a lot of people asked similar questions like this. I have tried using read.xls () Error in .Call("ReadXls", file, colNames, sheet, type, from, rowNames, : Incorrect number of arguments (11), expecting 10 for ReadXls read.table or read.csv (Wrong table format) odbcConnectExcel have problem with the URL I want to import this excel file
2012 Dec 04
1
error reading xlsm file with read.xls
Dear all, I cannot reading a .xlsm file using read.xls. I executed: read.xls("resultados.xlsm", colNames = TRUE, sheet = 1, type = "data.frame", from = 1, rowNames = NA, colClasses = "character", checkNames = TRUE, dateTime = "numeric", naStrings = NA, stringsAsFactors = F) Error: Call("ReadXls", file, colNames, sheet, type, from, rowNames, :
2012 Dec 04
6
leer .xlsm con read.xls
Buenas tardes usuarios de R. Estoy tratando de leer un archivo excel con read.xls usando la siguiente sentencia: read.xls("resultados.xlsm", colNames = TRUE, sheet = 1, type = "data.frame", from = 1, rowNames = NA, colClasses = "character", checkNames = TRUE, dateTime = "numeric", naStrings = NA, stringsAsFactors = F) Pero me da el siguiente error: Error
2012 Jan 08
2
Convert components of a list to separate columns in a data frame or matrix XXXX
Hello everyone, What is the most efficient & simpliest way to convert all components of a list to separate columns in a matrix? Is there an easy way to programmatically "pad" the length of the resulting shorter character vectors so that they can be easily combined into a data frame? I have the following code that stores the 2 compoents (of differing lengths) in the same character