similar to: R Help

Displaying 20 results from an estimated 400 matches similar to: "R Help"

2012 Feb 10
3
Help needed please
I have coded a time series from simulated data: simtimeseries <- arima.sim(n=1024,list(order=c(4,0,0),ar=c(2.7607, -3.8106, 2.6535, -0.9258),sd=sqrt(1))) #show roots are outside unit circle plot.ts(simtimeseries, xlab="", ylab="", main="Time Series of Simulated Data") # Yule ---------------------------------------------------------------------------- q1 <-
2012 Feb 07
2
Help need
I have mad a for loop to try and output values which i have named spectrum. However, I cannot seem to get the answers to come out as a vector which is what i need. They come out as separate values which I am then unable to join together. Thank you for(f in seq(0,0.5,0.1)) { sigmasqaured <- 1 i = complex(real = 0, imaginary = 1) spectrum <-
2010 Mar 02
1
simple data transformation question
Hi all, I have a (hopefully) simple newbie-level question.   # I have data like this: dtf <- data.frame(read.table(textConnection("var  value   company  9887.1   company  91117.0   blaah  91.1   etc  11   etc  97111"), header=TRUE))   # I would like to have output like this (the index number may vary): var  value.1 value.2 company 9887.1 91117.0 blah  91.1 NA etc 11 97111   # I
2012 Apr 25
4
"Conditional" average
Hello, I have a set of data including age, wage and education level each called age76, wage76 and grade76 I want to know how i can calculate the average wage of people age 15 to 65 (each year separetly) , only for those who have an education level of 10 12 and 16... -- View this message in context: http://r.789695.n4.nabble.com/Conditional-average-tp4585313p4585313.html Sent from the R help
2012 Mar 08
4
Problem with a Matrix
Dear All, I have a problem in making a matrix from a data. I did a summary data from a big data frame using (ddply), the resulting table is like that: Site.No Plant.Name Cover.Percentage 1 XXX 15 1 YYY 20 2 XXX 18 2 YYY 21 3 XXX 14 3
2006 Nov 30
1
data.frame within a function (PR#9294) (cont'd)
This continues the message "data.frame within a function (PR#9294)" that was posted on 2006/10/12. Duncan Murdoch kindly replied. I'm using the current version R 2.4.0, but the same issue exists. Just copy and paste the following code under R, and compare the output of f1() and f2() and the output of f3() and f4(). Does anybody have any idea? Thanks.
2011 Oct 13
8
Remove specific rows in a matrix/data.frame
Hi, imagine the following matrix/data.frame Letter Number a 1 a 1 b 1 b 0 c 0 c 1 d 0 d 0 If the numbers for two identical letters are also identical then I want to remove either the first or the second row of that letter. If for a letter the numbers are 1 and 0 I want to remove the row with the 0. That means if the code works I would and up with the following matrix/data.frame Letter
2006 Oct 04
1
extracting nested variances from lme4 model
I have a model: mod1<-lmer( x ~ (1|rtr)+ trth/(1|cs) , data=dtf) # Here, cs and rtr are crossed random effects. cs 1-5 are of type TRUE, cs 6-10 are of type FALSE, so cs is nested in trth, which is fixed. So for cs I should get a fit for 1-5 and 6-10. This appears to be the case from the random effects: > mean( ranef(mod1)$cs[[1]][1:5] ) [1] -2.498002e-16 > var(
2012 Sep 07
3
[LLVMdev] Publication - ErLLVM: An LLVM backend for Erlang
Sorry for double-posting to the list, The citation is the following (this time with a url to the paper): K. Sagonas, C. Stavrakakis, and Y. Tsiouris. "ErLLVM: An LLVM backend for Erlang"[1]. In Eleventh ACM SIGPLAN Erlang Workshop, September 2012. ACM Press. Thanks! Yiannis [1]: http://erllvm.softlab.ntua.gr/files/erlang03-sagonas.pdf On 09/07/2012 08:13 PM, Yiannis Tsiouris wrote:
2013 Feb 15
10
reading data
Hi, #working directory data1 #changed name data to data1.? Added some files in each of sub directories a1, a2, etc. ?indx1<- indx[indx!=""] lapply(indx1,function(x) list.files(x)) #[[1]] #[1] "a1.txt"??????? "mmmmm11kk.txt" #[[2]] #[1] "a2.txt"??????? "mmmmm11kk.txt" #[[3]] #[1] "a3.txt"??????? "mmmmm11kk.txt" #[[4]] #[1]
2007 Apr 05
2
creating a data frame from a list
Dear all, A few months ago, I asked for your help on the following problem: I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), +
2012 Nov 02
2
If loops?
I have a set of data with 205 988 observation sand 10 variables , three of which are Legal_status, Date_of_incorporation and Last_year. I set my time horizon from 1989 to 2009. Now I want to know when a company is dead. If Last_year is bigger or equal to 2009 then I say that a new "variable" last is 2009. If Last_year is smaller than 2009 then my new variable "last" is equal
2006 Jul 05
1
creating a data frame from a list
Dear all, I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), + b=c(A=2,B=3,C=0,D=NA), + c=c(A=NA,B=2,C=NA,D=0) ) > dtf a b
2012 Sep 10
0
[LLVMdev] Publication - ErLLVM: An LLVM backend for Erlang
ping. :-) On 09/07/2012 08:24 PM, Yiannis Tsiouris wrote: > [...] > The citation is the following (this time with a url to the paper): K. > Sagonas, C. Stavrakakis, and Y. Tsiouris. "ErLLVM: An LLVM backend > for Erlang"[1]. In Eleventh ACM SIGPLAN Erlang Workshop, September > 2012. ACM Press. > > [1]: http://erllvm.softlab.ntua.gr/files/erlang03-sagonas.pdf >
2011 Mar 06
2
How to load load multiple text files and order by id
Hello R users, I am fairly new to R and was hoping you could point me in the right direction I have a set of text files (36). Each file has only two columns (id and count) , I am trying to figure out a way to load all the files together and then have them ordered by id into a matrix data frame. For example If each txt file has : ID count id_00002 20 id_00003 3 A Merged File: ID
2006 Jul 12
1
help in vectorization
Hi, I have two data frames. One is like > dtf = data.frame(y=c(rep(2002,4), rep(2003,5)), + m=c(9:12, 1:5), + def=c(.74,.75,.76,.78,.80,.82,.85,.85,.87)) and the other dtf2 = data.frame(y=rep( c(2002,2003),20), m=c(trunc(runif(20,1,5)),trunc(runif(20,9,12))), inc=rnorm(40,mean=300,sd=150) ) What I want is to divide
2005 Jan 26
2
graphsheet substitute in R?
I'm using R 2.0.1 in a class I teach, with most students working under windows XP. We have a data frame with the first column containing the factor "site," and five water-quality variables at each site. As one part of exploring these data, I'd like the students to run by(ourdata,site,pairs). When I try that, however, the pairs plots for the first 10 sites scroll past, and
2012 Jul 20
2
Changing ungrouped cases to grouped cases
Hi, I have my data the following way: y A B C 0 1 1 2 0 1 2 1 1 1 1 2 0 1 1 2 1 1 1 2 1 1 2 1 0 1 2 2 . . . And so on. How can I make my data look like the following: y A B C 2 1 1 2 1 1 2 1 0 1 2 2 . . . In other words how can I change my ungrouped cases into grouped cases? Thanks! Chris [[alternative
2019 Jun 13
2
Problema de INSERT en Windows SQL
Pd: Perdón por el duplicado de mensaje, se me olvido poner el asunto al anterior y me han surgido nuevas consultas. Buenos días, llevo unos dias peleando para realizar una consulta con INSERT en Windows SQL. He probado varios paquetes de R y con ninguno lo he conseguido. Ahora mismo estoy probando con DBI y odbc. Probé con dbSendStatementy al ejecutar la consulta:
2004 Jan 24
1
loop variable passage and lists
I cannot understand why the following expression is accepted (and gives the expected result: to set column 3 and 4 of the first element of list1 -a data.frame list- as first element of list2): > list2[[1]]<-list1[[1]][3:4] ...while this one is not (to do the same iteratively from the first to the eleventh element of list1): > for (i in 1:11){list2[[i]]<-list1[[i]][3:4]} Error in