similar to: reading data into R

Displaying 20 results from an estimated 2000 matches similar to: "reading data into R"

2011 Feb 25
1
speed up process
Dear users, I have a double for loop that does exactly what I want, but is quite slow. It is not so much with this simplified example, but IRL it is slow. Can anyone help me improve it? The data and code for foo_reg() are available at the end of the email; I preferred going directly into the problematic part. Here is the code (I tried to simplify it but I cannot do it too much or else it
2012 Jul 25
2
old weird error message
Dear users, I have a weird questions. A friend of mine, some years ago, supposedly trying to access help files without Internet connection, got something like this error message: "The Pythia is not available, please go to Delphi" When I've heard about it, I found it very funny and I'd like to be able to get it. Does anyone of you know how to get this error message again?
2013 Jan 23
2
importing data
Dear All, Sorry for asking a newbie question. I want to ask how to import 1000 datasets whose file names are labelled from data1.dat to data1000.dat into R so that they are named M[1, , ] to M[1000, , ] accordingly. Thank you very much. Best Regards, Ray [[alternative HTML version deleted]]
2012 Jun 13
1
reading xls files using read.xls and xlsReadWrite
Dear R list, I am trying to read in .xls files. I have tried using package 'gdata', I get the following error. > dataset <- read.xls("June.xls") Wide character in print at /Library/Frameworks/R.framework/Versions/2.14/Resources/library/gdata/perl/ xls2csv.pl line 262. Seems like this is a problem coming from Perl? I tried to install package 'xlsReadWrite', it
2012 Oct 23
6
Join data frame columns
Hi, I have a data frame with 100 variables (numeric and non numeric types), and I want to join them in only one column, like a vector, but i want to keep the non numeric variables like they are. I know that i can do something like this: Suppose that my data is in df variable new_df<-data.frame(c(df[,1],df[,2],df[,3],df[,4],...........) This works but i have 100 variables! Any way of doing
2012 Mar 22
1
Replace sub string
Given: > filename<-paste(tempdir(),"\\","myfile.txt",sep=""); > sub("\\\\","/",filename); [1] "C:/DOCUME~1\\AJAYAS~1\\LOCALS~1\\Temp\\Rtmp2f270T\\myfile.txt" Note: Only the first occurence of \\ is replaced. What is the syntax for replacing every occurence? Thanks. [[alternative HTML version deleted]]
2012 Jun 18
2
Installing xlsx package on Mac OS X
Hi all, I'm using a Mac port of R on Mac 10.6. I need to install xlsx package but it does not install. Do any of you know a way to install it? Thanks very much. Sincerely, Victoria Xiao [[alternative HTML version deleted]]
2012 Jul 12
2
How to get all list item to one string variable
Hi, How to get all list item to one string variable. example a[1]="abc" b[1]="def" output="abc def" Thanks B.Purushothaman -- View this message in context: http://r.789695.n4.nabble.com/How-to-get-all-list-item-to-one-string-variable-tp4636283.html Sent from the R help mailing list archive at Nabble.com.
2012 Oct 23
1
doubt in command
Dear All, I I have one doubt about use of the command when has the same name (name of command) in two packages. For example: package: Stats package: Signal Both have the filter command. How use the command (filter) to a specific package, when I need work with both packages ? Thanks Julio [[alternative HTML version deleted]]
2013 Jan 25
2
How to name the elements of list
HI, I have the array list: X<-vector("list", 2) X[[1]] : data frame 1 X[[2]]: dataframe2 now i want to change index 1 and 2 into: "0-10" , "11-20" ,. finally I want to have X[["0-10"]]:dataframe1 X[["11-20"]]:dataframe2 how do I get them? Thanks a lot. Kind regards, Tammy [[alternative HTML version deleted]]
2012 May 19
3
anovas ss typeI vs typeIII
Hi all, I have been struggling with ANOVAs on R. I am new to R, so I created a simple data frame, and I do some analyses on R just to learn R and then check them on SPSS to make sure that I am doing fine. Here is the problem that I've run into: when we use the aov function, it uses SS Type I as default (on SPSS it is Type III). Then I used the Anova function under cars package using the
2006 Feb 20
3
Boxplot Help for Neophyte
R helpers I am getting to grips with R but came across a small problem today that I could not fix by myself. I have 3 text files, each with a single column of data. I read them in using: myData1<-scan("C:/Program Files/R/myData1.txt") myData2<-scan("C:/Program Files/R/myData2.txt") myData3<-scan("C:/Program Files/R/myData3.txt") I wanted to produce a
2012 Mar 27
1
Data indexing issue...
Dear R-help, My dataset (which is a data frame, called 'Calender' here) includes 365 rows representing 365 days for a year. One column ('Season')contains factor data representing seasons, e.g. spring, summer, autumn and winter. Another column (called 'Day') contains data representing wether the day is a working day (I use 'Wd' for short here)or weekend (I use
2012 Oct 23
2
vector indexing
Hi, I got a small problem on how to define the vector index without manually inspect the vector. example: y=c(2,3,5,2,4,6,8,3,6,2,5) #I have ten set of this kind of vectors (with different values but same length) that I would also like to run the routine below #say; v=the first index in y where the value is larger than 4, in this case index 3, value 5 #what I would like to do is take y[1:v]
2012 Jul 12
2
A simple simulation question
Hi! I would like to post the following question: I was trying to figure out how to do the simulation shown in Fig 10.6 of John Verzani's book 'Using R for Intro Statistics'. It is on page 290, with a description on the previous page. It seems like a simple thing... Just needing to duplicate a procedure. (Perhaps I need to do it with a loop?) This is what I was trying:
2013 Jan 17
3
how to use "..."
Dear users, I'm trying to learn how to use the "...". I have written a function (simplified here) that uses doBy::summaryBy(): # 'dat' is a data.frame from which the aggregation is computed # 'vec_cat' is a integer vector defining which columns of the data.frame should be use on the right side of the formula # 'stat_fun' is the function that will be run to
2013 Mar 12
1
loading data frames and rbind them
Hello everybody I have the following problem. I have to load a number of xls files from different folders (each xls file has the same number of columns, and different numbers of rows). Each xls file is named with a number, i.e. 12345.xls and is contained in a folder with same name, say 12345) Once loaded, I want to rbind all of them to obtain a single database. I think I successfully did the
2012 Jul 11
3
how to create the data frame
there is a data frame £¬x weekly.returns 2010-1-4 -0.015933327 2010-1-11 -0.015042868 2010-1-18 0.005350297 2010-1-25 -0.049324703 2010-2-1 -0.052674121 when i input colnames(data)[1] <- 'date' it becomes date 2010-1-4 -0.015933327 2010-1-11 -0.015042868 2010-1-18 0.005350297 2010-1-25
2009 Jan 06
5
Using apply for two datasets
I can run one-sample t-test on an array, for example a matrix myData1, with the following apply(myData1, 2, t.test) Is there a similar fashion using apply() or something else to run 2-sample t-test with datasets from two groups, myData1 and myData2, without looping? TIA, Gang
2012 Nov 28
3
filter data.frame with a vector
Hello together, i have a data.frame, which i want to filter with numbers in a vector. I have a vector (Top10) with these numbers: [1] 205 302 156 378 235 328 183 375 296 374 and i have a data.frame with a Column (CU_NO) with all my Customer numbers. How can i filter this data.frame, with the Numbers in my vector. this one doens't work: