Displaying 5 results from an estimated 5 matches for "sample_".
Did you mean:
sample
2013 Jun 10
1
Selecting divergent colors
...the colors.
So, is there a way that I can select a large number of colors (i.e. perhaps
20) that are as different from each other as possible?
Here is my example code using the palette:
**********************
mat <- matrix(sample(1:1000,1000,replace=T),nrow=20,ncol=20)
snames <- paste('Sample_',1:ncol(mat),sep='')
colnames(mat) <- snames
mycols <- palette(rainbow(ncol(mat)))
for(k in 1:ncol(mat)){
plot(density(mat[,k]),col=mycols[k],xlab='',ylab='',axes=F,main=F)
par(new=T)
}
legend(x='topright',legend=snames,fill=mycols)
****************...
2018 Oct 04
2
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
...me?# auto-correlation _when the sample that is drawn is small_.#?# I describe the problem using two functions:# ??# ? DistributionAutocorrelation_Unexpected which as the wrong behavior :?# ? _when drawing some small samples using rnorm, there is generally a?# strong negative auto-correlation in the sample_.#?# and#?# DistributionAutocorrelation_Expected which illustrate the expected behavior#?#?#?# *Unexpected : *# ??# ? DistributionAutocorrelation_Unexpected = function(SampleSize){# ? ? Cor = NULL# ? ? for(repetition in 1:1e5){# ? ? ? X = rnorm(SampleSize)# ? ? ? Cor[repetition] = cor(X[-1],X[-lengt...
2018 Oct 04
2
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
...me?# auto-correlation _when the sample that is drawn is small_.#?# I describe the problem using two functions:# ??# ? DistributionAutocorrelation_Unexpected which as the wrong behavior :?# ? _when drawing some small samples using rnorm, there is generally a?# strong negative auto-correlation in the sample_.#?# and#?# DistributionAutocorrelation_Expected which illustrate the expected behavior#?#?#?# *Unexpected : *# ??# ? DistributionAutocorrelation_Unexpected = function(SampleSize){# ? ? Cor = NULL# ? ? for(repetition in 1:1e5){# ? ? ? X = rnorm(SampleSize)# ? ? ? Cor[repetition] = cor(X[-1],X[-lengt...
2009 May 15
2
Help with loops
Hi
I am trying to create a loop which averages replicates in my data.
The original data has many rows. and consists of 40 column zz[,2:41] plus row headings in zz[,1]
I am trying to average each set of values (i.e. zz[1,2:3] averaged and placed in average_value[1,2] and so on.
below is my script but it seems to be stuck in an endless loop
Any suggestions??
for (i in 1:length(average_value[,1])) {
2018 Oct 05
2
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
On 05/10/2018, 09:45, "R-help on behalf of hmh" <r-help-bounces at r-project.org on behalf of hugomh at gmx.fr> wrote:
Hi,
Thanks William for this fast answer, and sorry for sending the 1st mail
to r-help instead to r-devel.
I noticed that bug while I was simulating many small random walks using
c(0,cumsum(rnorm(10))). Then the negative