similar to: loop through files and create object

Displaying 20 results from an estimated 300 matches similar to: "loop through files and create object"

2012 Jun 24
2
Defining multiple variables in a loop
Good day, For lack of a better solution (or perhaps I am ignorant to something more elegant), I have been bootstrapping panel data by hand so to speak and I would like to know if there is a way to define multiple variables in a loop using the loop variable. I found a post (here: https://stat.ethz.ch/pipermail/r-help/2002-October/026305.html ) that discussed naming multiple variables but it
2012 Apr 22
10
Assignment problems
The text below is a part of, some work I have to do, which is due in 2 days and I am strung up with a lot of other stuff, so I was hoping someone would take 5 mins and help me ?? Here is a part of my data.frame: year country1 country2 contig comlang pop1 gdp1 pop2 gdp2 rta dist avgflow 1 1992 AUS AUT 0 0 17.4950008 321708.281
2012 Apr 17
6
How to add specific column to data.set?
Hi I have a data.set with 7 lists, with over 7000 observations in each list. to of the lists contain country names. like: aus dnk fra aus usa aut itl usa . . . etc. My dilemma is that I want to add an extra column/list to my data.set. If the countries are both european it should be assigned 1 or true AND if one or both the countries are non-european it should be assigned 0 or false.
2013 Apr 09
4
quotes in cat() within function
Hello all, Sorry if this question has been answered in the past, but I could not find an answer. I am trying to print quotes within a cat output. The arguments are: file= "Data labels" directory= "/home/mylaptop/" The function returns: cat("The file", file, "is located in directory", directory, sep=" ") The output R prints is The file Data
2012 Aug 27
2
looping through numbered variables
Hello, This is a beginner question. I am trying to loop through numbered variables with "apply" to calculate weighted means. My data is "data", the variables are "var1" to "var100", the weight is "weight". The command works using sapply(paste('data$var', 1:100, sep=''), function(x) weighted.mean(eval(parse(text=x)), data$weight))
2009 Dec 01
1
LMER: How to specify Random Effects
I saw different specifications for Random Effects and I'm confused about the use of "/" and the use of "(0+...|)" . Let say we have a nested structure where some countries have some several plants in different states and we measure the reaction to a drug. The list of Countries = USA, France, Italy The States for USA = Michigan, Florida, California The States for France
2013 Feb 05
1
lmer - BLUP prediction intervals
Dear all I have a model that looks like this: m1 <- lmer(Difference ~ 1+ (1|Examiner) + (1|Item), data=englisho.data) I know it is not possible to estimate random effects but one can obtain BLUPs of the conditional modes with re1 <- ranef(m1, postVar=T) And then dotplot(re1) for the examiner and item levels gives me a nice prediction interval. But I would like to have the prediction
2010 Mar 30
2
Create a new variable
Dear R-list, Sorry for spamming the list lately, I am just learning the more advanced aspects of R! I have some data that looks like this: Out Country1 Country 2 Country 3 ... CountryN 1 1 1 1 1 0 1 1 0 1 1 1 0 1 0 I want to create a new variable that counts the number of zeros in every row whenever Out is equal to 1, and else it is a zero, so it would look like this: new_var 0 0 2 I
2007 Aug 07
1
lmer() : crossed-random-effects specification
Dear all, I want to estimate a crossed-random-effects model (i.e., measurements, students, schools) where students migrate between schools over time. I'm interested in the fixed effects of "SES", "age" and their interaction on "read" (reading achievement) while accounting for the sample design. Based on a previous post, I'm specifying my model as: fm1 <-
2006 Sep 13
2
recursive methods for concatenating sets of files
Hello, I would like to read sets of files within a folder, perhaps using recursive methods. Right now, I rename the files before import. It would be even better to do this without renaming files, without providing explicit filenames, perhaps by importing files based on chronology, and translating each filename into a header? Please excuse my ignorance, and help cure my clunky programming
2003 Mar 06
1
tkexit
Sorry, my question is if exists a command tkexit in R, i need a command how exit of tcl for close an aplication. How to use him. Thank
2009 Apr 06
1
political maps world maps in R, wrld_simpl
dear all, I'm a newbie in map tools. I was asking to perform an apparently very simple task. I have a list of countries (about fifty all over in the world) scored with a real positive value. Eg Country score Italy .56 UK .58 Korea .41 Mexico .63 ... I wish to plot geographical maps where every country is filled with a color depending on his score. Using maptools library and
2004 Jul 12
2
.Platform addition (was Re: where does R search when source()?)
On Sun, 11 Jul 2004, Gabor Grothendieck wrote: > search.path <- > function(fn, > paths = strsplit(Sys.getenv("PATH"), split = ";")[[1]], > fsep = "\\") { > for(d in paths) { > f <- file.path(d, fn, fsep = fsep) > if (file.exists(f)) > return(f) > } > return(NULL) > } >
2012 Oct 20
2
Help with programming a tricky algorithm
Hi All, I'm a little stumped by the following problem. I've got a dataset with the following structure: idxy ix iy country (other variables) 1 1 1 c1 x1 2 1 2 c1 x2 3 1 3 c1 x3 . . . . . 3739 55 67 c7 x3739 3740 55 68 c7 x3740 where ix and
2009 May 22
2
Returning only a file path on Windows
I am choosing a file like this: #Bring up file selection box fn<-file.choose() fp<-file.path(fn,fsep='\\') Unfortunately, the file path contains the short file name and extension as well. I had hoped to get only the path so I could make my own long filenames (for output graphs) by concatenation with this file path. Of course I can split the string and assemble the components from
2018 Apr 13
0
Fwd: R Timeseries tsoutliers:tso
Hello, Writing to seek help in regard to some unexpected performance anomaly i am observing in using tsoutlers:tso on the mac vs on an AWS cloud server.. I am running the following code with very small dataset of about 208 records. d.dir <- '/Users/darshanpandya/xxxxxx' FNAME <- 'my_data.csv' d.input <- fread(file.path(paste0(d.dir,"/zzz/"),FNAME,fsep =
2013 Sep 10
2
Normalidad para datos multivariados
Hola! Estoy teniendo un problema para testar la normalidad y la homogeneidad de varianzas para mi modelo de manova Es este mi modelo: m1<-manova(cbind(pred,fit,oniv)~tratamento/parcela+bloco,data.vegetacao) Aparte de tener tres variables respuestas (predador, fitófago, omnívoro), también es un diseño anidado. Alguien sabría responder esto? Gracias! Carol [[alternative HTML version
2013 Feb 08
1
vegdist Error en double(N * (N - 1)/2) : tama?o del vector especificado es muy grande
---------- Forwarded message ---------- From: <r-help-owner@r-project.org> Date: 2013/2/8 Subject: vegdist Error en double(N * (N - 1)/2) : tama?o del vector especificado es muy grande To: caro.bello58@gmail.com Message rejected by filter rule match ---------- Mensaje reenviado ---------- From: caro bello <caro.bello58@gmail.com> To: r-help@r-project.org Cc: Date: Fri, 8 Feb 2013
2007 Jun 15
3
how to plot two graphics in one window
Hello , Maybe this question you answered before, but i couldnt find something indicated in the mailing list. I wish to plot two graphics in one window, for example y=sinx and y=exp(x) in the same windows, (the same interval for x). Thanks . Miguel. -- View this message in context: http://www.nabble.com/how-to-plot-two-graphics-in-one-window-tf3929594.html#a11145186 Sent from the R help
2014 Dec 18
2
Joining the SIG - oVirt project
On 16/12/14 16:04, George Dunlap wrote: > On Wed, Dec 3, 2014 at 7:30 AM, Sandro Bonazzola <sbonazzo at redhat.com> wrote: >> Hi, >> I just joined the CentOS-virt call yesterday for the first time and it was a pleasure to meet you there. >> My name is Sandro Bonazzola[1] and I'm a member of the integration team and the release engineering manager for oVirt