Displaying 3 results from an estimated 3 matches for "clips10".
Did you mean:
clips
2010 Aug 11
5
Creating vectors
I didn't really know what to post as the topic subject, but I have a vector,
for instance (2,2,4,6,2,4,4,6,8,6) and I want to create another vector which
is just numbers from 1 to 4 since there are only 4 unique numbers in my
vector, so for instance 2 would be 1, 4 would be 2, 6 would be 3, and 8
would be 4, so my new vector would be
(1,1,2,3,1,2,2,3,4,3). The vector I have has longer
2010 Jun 18
2
Vector manipulation, for loop needed?
Hi,
I have a vector of time in days t<-1:48.
I have observations and the day they were recorded. I also have a vector, S
which takes different values depending on which day the observation was
recorded. For example if on day 1 all in vector S get a value of 46/48, on
day 2 get 42/48, day 3 38/48, decreasing by 4/48 each time until day 12 gets
the value 2/48. Then for any day greater than 12
2011 May 16
1
Matrix manipulation in for loop
Hi all,
I have a problem with getting my code to do what I want!
This is the code I have:
create.means.one.size<-function(nsample,var,nboot){
mat.x<-matrix(0,nrow=nboot,ncol=nsample)
for(i in 1:nboot){
mat.x[i,]<-sample(var,nsample,replace=T)
}
mean.mat<-rep(0,nboot)
for(i in 1:nboot){
mean.mat[i]<-mean(mat.x[i,])
}
sd.mean<-sd(mean.mat)
return(mean.mat)
}
where