Displaying 1 result from an estimated 1 matches for "colprob".
Did you mean:
col2rgb
2009 Oct 12
1
field index given name.
Hi,
How do I access the index number of a field given I only know the field
name?
eg - I want to set the probability of the field 'species' higher than the
other fields to use in sampling.
> colprob <- array(dim=NCOL(iris))
> for(i in 1:NCOL(iris)){colprob[i]=0.5}
> colprob[iris$species] = 1 #this doesn't work
> colprob
[1] 0.5 0.5 0.5 0.5 0.5
--
View this message in context: http://www.nabble.com/field-index-given-name.-tp25851216p25851216.html
Sent from the R help maili...