similar to: Read header csv file

Displaying 20 results from an estimated 6000 matches similar to: "Read header csv file"

2009 Sep 23
1
Variable as a filename
Hi R community, I have a question. I have 5 files in a directory. Each file has a year as a name (file 1 ->2004, file 2-> 2005, ...). I want to build a for loop where I call first file, do some calculations, go to second file, do some calculations, etc. Somethin like this: year<-2003 nfiles <- length(dir()) for( year in 2003:nfiles) {clima<-read.csv2([year]".csv",
2018 May 25
1
how to make the code more efficient using lapply
Eric's approach seems reasonable to me, and I agree that it's probably not the use of a "for" loop that makes the original version slow. As Eric mentioned, there are lots of unnecessary things happening in the loop. For example, list.files() was called twice inside the loop, which is unnecessary, and will definitely slow the loop down (though probably not by much). Call it
2018 May 25
0
how to make the code more efficient using lapply
Hi Stephen, I am not sure that the "for loop" is the source of slowness. You seem to be doing a lot of unnecessary work each time through the loop. e.g. no need to check if it's the last file, just move that section outside of the loop. It will be executed when the loop finishes. As it is you are calling list.files() each time through the loop which could be slow. In any case
2018 May 25
2
how to make the code more efficient using lapply
Dear All, I have a following for-loop code which is basically intended to read in many excel files (each file has many columns and rows) in a directory and extract the some rows and columns out of each file and then combine them together into a dataframe. I use for loop which can do the work but quite slow. How to make it faster using lapply function ? Thanks in advance! temp.df<-c() #
2012 Mar 27
2
new chain cleanups - question re. preferred license
I'm preparing a few simple patches that will cleanup few things regarding new chain - in particular the ones I mentioned in Januray during discussion with Shao (tone down overkill abstractions, etc.). One question on a formal side though - which license is preferred at the top of the source files ? Currently there're two present - either something bsd-ish (on parts derived from
2016 Oct 31
2
Schema Mismatch with Server 2008 RC
I have a domain with multiple Samba DC, and one MS Server 2008 R2 DC. The Samba servers came first and then I added the MS DC. I am having problems replicating, it gives me a schema mismatch error. If I run ldapcmp ./samba-tool ldapcmp ldap://DC1 ldap://DC2 -Uadministrator schema --filter=whenChanged Password for [MYDOMAIN\administrator]: * Comparing [SCHEMA] context... * Objects to be
2009 Sep 24
2
P-value and R-squared variable selection criteria
Hi R community I have a question. I'll explain my situation. I have to build a climate model to obtain monthly and annual temperature from 2004 to 2008 from a specif area in Almeria (Spain). To build this climate model, I will use Multiple regression. My dependant variable will be monthly and annual temperature and independant variables will be Latitute, Longitude and Altitude and I will work
2009 Oct 06
0
Interpolation
Hi R community I need to interpolate precipitation data for a natural park. I have precipitation data from some climate stationts. (I know the table is not complete but I only need to show you X,Y, Altitude and PrepJul) X Y Altitude PrepJan PrepFeb PrepMar PrepAp PrepMay PrepJun PrepJul 597706 4093438 41 0 9 77,8 63,1 17,5 0 2,6 597535
2004 Sep 22
1
Compile error in 2004-09-21 R 1.9.1 Patched
Hi all, I just downloaded the latest R-patched tarball [Version 1.9.1 Patched (2004-09-21)] and ran into an error during compilation. This is on FC2 and the error is as follows: dounzip.c: In function `do_unzip': dounzip.c:144: error: syntax error before '/' token make[3]: *** [dounzip.o] Error 1 In reviewing the source file, there appears to be an errant '/' on line 144. A
2012 Oct 12
2
Problem to read non-standard csv file
Hi all, I have a problem to read csv file with comma as decimal. The numbers were readed as strings. I used the following string in R, but I do not understand why it does not work. tab <- read.csv2("Specimen_RawData_1.csv", header = TRUE, sep = ";", dec = ",", nrows = -1) In addition, I copy/past into the post the link to the csv file generated by my instrument.
2009 Jul 28
2
formatting in r
Hello, I have output that I want to print out. I am having a few issues. 1] output u to power is really nothing more than a 2 x 11 set of values formed using cbind function and printed out as a data frame How can I get it to output over several lines such as seen here? 2] Critical Z etc. were added by hand. I need an example of how I can mix alphanumeric and numeric data on
2004 Jan 15
2
A language technical question.
If I have 100 objekts in a folder and I prefer not to load them manually I wonder how I do this in R if using a for-loop. I was thinking initially to do something like this: infiles <- dir(pattern=".RData") for(i in length(infiles)) { load(infiles[i]) paste("kalle", i, sep="") <- saveLoadReference } But the line
2000 Aug 14
5
Writing a workable function
After searching in R- Introduction, FAQ, help... I don't understand this: I write a function in a file (.R): tt <- function(mc) { date() mc<-read.csv2("machines.txt",na.strings="") date() } I source it in R and I type tt(). The answer is > tt() [1] "Mon Aug 14 11:18:25 2000" > The instructions following the first "date()" are ignored. Why?
2009 Nov 24
1
extraer un valor de un objeto lmer
> > Hola, a todos! Estoy ajustando un modelo componentes de varianza utilizando el paquete lme4, quiero extraer luego los valores estimados de varianza de cada factor aleatorio de este objeto lmer y guardarlo en un vector. Existe la función VarCorr, Esto es lo que hago: Mi ejemplo: tengo 3 factores NDVIaño; Máx.IH; TV # Ajusto el modelos lmer(peligro100 ~ 1 + (1|NDVIaño) + (1|Máx.IH) +
2007 May 29
2
search path question
Hi R users, Is there a simple function that can add a folder into current R search path? For example, suppose my current work directory is "D:\work", but my input files are stored in folder "C:\inFiles\", I know I can change work directory or add "C:\inFiles\" before files name when I scan them, but I don't want to do that. I want to find a function that can
2005 Aug 04
2
The killer app for Asterisk in corporate deployment
We're a dealer in Europe selling commercial phone & building management systems, some residential too. All the new office buildings have an EIB bus to manage the lights, clima, security access, etc. The big companies also have Crestron or AMX automation and media servers for the boardroom. Asterisk is an awesome phone solution, but if we could offer a solution that tied it all together
2016 Oct 31
0
Schema Mismatch with Server 2008 RC
I have also experienced this issue. Additionally, new objects created in AD would show up on both the S4 DCs (4.5.x) and the Server2008R2 DC, but the password would not sync between them in either direction after the initial join replication. Thomas Maerz > On Oct 31, 2016, at 12:52 PM, Wayne Andersen via samba <samba at lists.samba.org> wrote: > > I have a domain with multiple
2002 Feb 21
0
data.dump from S to R: no functions
Janice, I echo to the rhelp list, it might be useful for others. My answer is after your message. On Thu, 21 Feb 2002, Watkins, Janice wrote: > This isn't a reply that will help you solve your problem but instead a > request for information. Do you know an easy way to do a data.dump in > S-Plus that excludes the functions? What I always do is to keep copies of > the functions
2006 Mar 03
1
extracting p-values from lmer outputs
I would like to write a function that runs GLMM using lmer on a user-input model containing interactions, but if the model doesn't produce significant results for the interaction, a reduced model will be run without the interaction. Doing this seems to require getting the p-values out of an lmer object, but I don't know how to do this. (The grand DF debate seems to be irrelevant since the
2009 Aug 12
2
Como imponer una matriz de correlaciones en un modelo mixto?
Hola, mi pregunta es la siguiente: Tengo un modelo genético aditivo, donde los individuos estan emparentados. Quiero que la matriz de parentesco sea la matriz de coeficientes de las correlaciones entre genotipos. En SAS, con PROC MIxed podia agregarla como un archivo y usarla en la sentencia random...No encuentro como hacerlo en R, alguna idea?? En resumen, puedo imponerle a los efectos