similar to: Combining many csv files into one and adding a column with an id of each csv file read

Displaying 20 results from an estimated 10000 matches similar to: "Combining many csv files into one and adding a column with an id of each csv file read"

2012 May 18
3
Sort across multiple csv
Dear R help list, I am very new to R and I apologize in advance if this has been answered before. I have done my best to google/R search what I need but no luck. Here is what I am attempting: I have hundreds of .csv files that I need to sort based on a single column of alphanumeric data. All of the files contain matrices that have identical dimensions and headers, however the data table
2007 Jul 14
3
How to read many files at one time?
I want to load many files in the R. The names of the files are "Sim1.txt", " Sim2.txt", "Sim3.txt", "Sim4.txt", "Sim5.txt" and so on. Can I read them at one time? What should I do? I can give the same names in R. Thanks. For example: > tst=paste("Sim",1:20,".txt",sep="") # the file names > tst [1]
2008 Feb 26
2
Multiple lines with a different color assigned to each line (corrected code)
Sorry, I just realized I didn't type in the correct names of the variables I am working with, this is how it should be: plot(1,1,type="n") for (i in summ$tx) { points(summ$timep[summ$tx==i],summ$mn[summ$tx==i]) lines(summ$timep[summ$tx==i],summ$mn[summ$tx==i]) } Thank you, Judith ____________________________________________________________________________________
2006 Sep 29
2
rsyncing many files and hard links: optimisation suggestions?
I suspect the standard optimisation - breaking up the rsync into smaller batches - is not going to work for us. This is our situation: We rsync two directories in /spool to a backup. They are large: almost 2mil files in the first dir, with about 4mil hard links in the second one linking to them. The files don't change much; a few thousand added daily, and with about 3 hard links created for
2010 Jan 09
2
aov function syntax
Hello, I have a simple question about using the aov function syntax (ie. * + or :) for the interaction of 2 factors. I have read the help files, and researched other sites, and have included my source files. My goal is to measure the signifigance of the interaction between population and condition (aka. population:condition). I can't seem to figure it out. 1. In the first example the
2012 May 25
3
Multiple cbind according to filename
Hi all, I'm just a beginner with R but I have not been able to search for any relevant answer to my problem. I apologize if it has in fact been asked before. Recently I've realized that I need to combine hundreds of pairs of data frames. The filenames of the frames I need to combine have unique strings. This is my best guess as to the approach to take: filenames<-list.files()
2006 Jun 01
1
a matrix in a seprate window?
A very simple one but I cannot figure it out. I have a matrix and I want to display it in a seprate window. I would really like it if it worked on both linux and windows. cheers [[alternative HTML version deleted]]
2011 Apr 30
3
using tapply with multiple variables
HI All, I have a long data file generated from a minimal pair test that I gave to learners of Arabic before and after a phonetic training regime. For each of thirty some subjects there are 800 rows of data, from each of 400 items at pre and posttest. For each item the subject got correct, there is a 'C' in the column 'Correct'. The line: tapply(ALLDATA$Correct,
2007 Mar 31
1
Problem with S4 inheritance: unexpected re-initialization?
Dear all, To explain my problem I am attaching a demonstration package "myclasspkg": I have the following two S4 classes with similar inheritance: SubSubClassA <- SubClassB <- BaseClass SubSubClassB <- SubClassB <- BaseClass In R I am calling the following functions: > library(myclasspkg) > subA <-
2002 Oct 08
2
Samba password changes?
hi, i've setup a LDAP server with account information, and compiled samba with ldap support. everything works great, except for the password changes i still have to run two seprate commands ( passwd, smbpasswd ) to change a users password. i've tried to put the pam_smbpasswd.so module into system-auth, but that does work? any pointers? thanks adriaan putter
2010 Sep 13
2
How to tell R that "ABC" is the name of a dataset not a variable value
All, For example, I have a dataset named "ABC" loaded into R > ABC [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 and I also have a variable datasetname > datasetname [1] "ABC" and I want to add this "ABC" dataset to an existing list "alldata" > alldata <-NULL > alldata <- as.list(alldata) since I will
2008 Jul 09
4
Strptime/ date time classes
Dear all, I've come across a problem using strptime, can anyone explain what's going on? I'm using version 2.7.0 on Windows XP. Thank you Caroline First read in a data file using read.table alldata = read.table(file, header=F, skip=4, colClasses = c("character","numeric")) dim(alldata) [1] 223960 2 # inefficient, safe way of sorting out missing or dodgy
2009 Jun 12
2
Automate a data load and merge
Hi R list, I would like to automate, or speed up the process from which I take several separate datasets, stored in .csv formate, import and merge them by a common variable. So far I have greatly sped up the loading process but cannot think of a way to automate the merger of all datasets into a common data.frame. My apologies if this has been covered, any R search suggestions are
2008 Feb 05
6
Sampling
Hi there, I want to generate different samples using the followindg code: g<-sample(LETTERS[1:2], 24, replace=T) How can I specify that I need 12 "A"s and 12 "B"s? Thank you, Judith ____________________________________________________________________________________ Be a better friend, newshound, and
2009 Apr 10
1
Subset a data frame for plotting
Hello, I have a question regarding how to subset/select parts of a data frame (matrix) in order to plot data associated only with this subset. Specifically I have a large data frame in which one column contains ID values (dates), and other columns contain data I would like to plot (temperature, light, etc.). I would like to break up this large matrix so as to plot data associated
2012 Aug 10
1
Direct Method Age-Adjustment to Complex Survey Data
Hi everyone, my apologies in advance if I'm overlooking something simple in this question. I am trying to use R's survey package to make a direct method age-adjustment to some complex survey data. I have played with postStratify, calibrate, rake, and simply multiplying the base weights by the correct proportions - nothing seems to hit the published numbers on the nose. I am trying to
2009 Aug 25
3
Regular expression to define contents between parentheses
Hello dear R-helpers, I haven't been able to figure out of find a solution in the R-help archives about how to delete all the characters contained in groups of parenthesis. I have a vector that looks more or less like this: myvector<-c("something (80 km/h, sd) & more (6 kg/L,sd)", "somethingelse (48 m/s, sd) & moretoo (50g/L , sd)") I want to extract all
2007 Nov 14
2
no applicable method for "names"
hi, after installing R-2.6.0 the function "names" doesn't work anymore on my windows xp machine. for example for a simple vector i get > z <- 1:3 > names(x) Error in UseMethod("name"): no applicable method for "names" ... instead of NULL. the same is true for lists and dataframes. attr(z, "names") is a workaround, but i don't want to
2004 Dec 09
4
Scatterplot question
Dear list members, I have a probably simple question concerning scatterplots: I want to draw a plot with one X but several Y columns, so that every group of samples gets a different symbol. My table looks like this: X Y1 Y2 Y3 1 1 2 3 3 5 4 7 5 9 6 11 7 13 8 15 Simple in Excel or StarOffice, but how do I do it in R? Thanks a lot Judith
2012 Oct 03
1
Difficulties in trying to do a mixed effects model using the lmer function
Dear people of the help list I am drying to analyze my data using the 'lmer' function and I keep having problems. This is the model: > fm1<-lmer(dbh~spec+scheme+(1|Plot),data=d, REML=FALSE). I analyse tree size (dbh) of 3 different species (spec) and 3 planting schemes (scheme). I have 5 plots, which I hope to model as a random factor. (However, the subsequent output is based on