Displaying 4 results from an estimated 4 matches for "sim5".
Did you mean:
sim
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] "Sim1.txt" "Sim2.txt" "Sim3.txt" "Sim...
2012 Mar 16
2
Elegant Code
...eta2 <- rgamma(50,0.5,(1/b2))
sim2 <- rpois(50,theta2)
b3 <- rigamma(50,1,1)
theta3 <- rgamma(50,0.5,(1/b3))
sim3 <- rpois(50,theta3)
b4 <- rigamma(50,1,1)
theta4 <- rgamma(50,0.5,(1/b4))
sim4 <- rpois(50,theta4)
b5 <- rigamma(50,1,1)
theta5 <- rgamma(50,0.5,(1/b5))
sim5 <- rpois(50,theta5)
par(mfrow=c(1,5))
boxplot(sim1)
boxplot(sim2)
boxplot(sim3)
boxplot(sim4)
boxplot(sim5);
Thanks,
Raphael
2005 Mar 31
2
how to simulate a time series
...frame(sim)
colnames(allsim) <- paste("sim",1:5,sep="")
all <- cbind(rdtb,allsim)
#--------------------------------
I don't understand why the simulation runs generate virtually identical
values:
> all[100:105,]
rdtb sim1 sim2 sim3 sim4 sim5
100 2.3863636 1.065661 1.065661 1.065661 1.065661 1.065661
101 1.9318182 2.606093 2.606093 2.606093 2.606093 2.606093
102 2.2954545 3.854074 3.854074 3.854074 3.854074 3.854074
103 2.5882353 4.880240 4.880240 4.880240 4.880240 4.880240
104 2.0227273 4.917622 4.917622 4.917622 4.917622 4.917622...
2009 Mar 17
0
(no subject)
...ed(1)
iso <- predict(g.dummy, newdata = xy, nsim = 10)
gridded(iso) = ~x+y
# spplot(iso,main="isotropic") # not essential for this question
# I could make a dataframe like:
diso<-data.frame(iso)
diso[1:4,]
# which results in:
# x y sim1 sim2 sim3 sim4 sim5 sim6
sim7 sim8 sim9 sim10
# 1 1 1 0.4093776 1.0752794 -1.5654566 0.6183240 -2.196812 0.4545051
-0.06372423 -2.1544707 -1.131036 -0.4008869
# 2 2 1 0.8133436 0.9041941 -0.9712924 0.4319641 -2.432893 1.0770354
0.21302299 -1.6938882 -2.065350 -0.5331123
# 3 3 1 0.8238881 0.8631968...