search for: fieldtrial0809

Displaying 5 results from an estimated 5 matches for "fieldtrial0809".

2009 Oct 23
5
Change positions of columns in data frame
...r threads or anywhere else. I've added some new vectors as columns in a data frame using cbind(). As they're all put as the last columns inte the data frame, I would like to move them to specific positions. How do you do to change the position of a column in a data frame? I know I can use fieldTrial0809=data.frame(Sample_ID=as.factor(fieldTrial0809$Sample_ID), Plant_ID=as.factor(fieldTrial0809$Plant_ID), ...) to create a new data frame with the given columns in the specified order, but there must be an easier way..? All the best, Joel ________________________________________________...
2009 Oct 27
2
Print several xyplots to the same page in a pdf file
...ee grouped plots onto one page as I'm putting them into a pdf-file, which gives me a huge amount of pages... Is it possible to put them all, or at least more than one on the same page, for instance put three groups beside each other like columns? ... xyplot(Pro ~ Glc | Categories_BBCH_ID, data=fieldTrial0809, pch="°", layout=c(1, 3), aspect=1, index.cond=list(3:1)) xyplot(Pro ~ Raf | Categories_BBCH_ID, data=fieldTrial0809, pch="°", layout=c(1, 3), aspect=1, index.cond=list(3:1)) xyplot(Pro ~ Suc | Categories_BBCH_ID, data=fieldTrial0809, pch="°", layout=c(1, 3), aspect=1,...
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
Hi all, I'm making a PCA plot with eight variables (columns taken from a larger data frame "fieldTrial0809[idx,c(39:46)]"). I then want the symbols in the plot to be colored as a gradient from red to blue, depending on the value of another column in "fieldTrial0809[idx, c(48)]" containg temperatures from -12.1 to -5.4. I don't want to use the heat.colors(n) function, because then...
2009 Oct 27
1
Exclude rows in xyplot
Hi all, I'm searching for a way to exclude outliers from my dataset while making xyplots. While plotting using pairs(), I exclude specific row in my data frame and save the settings as a variable which I later include as an argument: # Discard outliers and save settings as idx idx=with(fieldTrial0809, which(Pro>0 & Pro<0.95 & Fum>0 & Fum<0.4 & Mal>0.1 & Mal<2.5 & Glc>2 & Glc<20 & Fru>1 & Fru<30 & Raf>0 & Raf<3 & Suc>1 & Suc<14)) #Plot the numerical and ranked columns pair wise using pairs() pdf(&quot...
2009 Nov 03
2
Change negative values in column
...ata frame column to a small positive value, based on the the minimum value of the column. However, I get the following error: Error in if (x[i] < 0) { : argument is of length zero As well, I would "minimum" to be the smallest of the non-negative values... Aa_non_neg=(fieldTrial0809$Aa) # Copy column from data frame to manipulate nonNegative = function(x) { minimum=min(x) # Should only use positive minimum! for (i in x) { if(x[i]<0) # Found a negative value { x[i]=minimum/10 # Change to a new non-negative value } } } nonNegati...