Forum: help
Monitor Forum | | RE: Welcome to Help [ Reply ] By: Roberto Barbetti on 2010-10-05 14:30 | [forum:3443] |
| Well! done... | |
| RE: Welcome to Help [ Reply ] By: Julien Moeys on 2010-10-05 14:11 | [forum:3442] |
|
Hi Roberto I think you are not using the latest version of "soiltexture" (it works on my PC, but not with an old version) install the lastet one from CRAN or r-forge The possibility to pass a vector of colors to class.p.bg.col was only added recently... Julien |
|
| RE: Welcome to Help [ Reply ] By: Roberto Barbetti on 2010-10-05 13:51 | [forum:3441] |
|
yes this is the question... but last statement give me an error: Error in (class.sys != "none") & class.p.bg.col :operations are possible only for numeric, logical or complex types thanks for your help |
|
| RE: Welcome to Help [ Reply ] By: Julien Moeys on 2010-09-30 14:38 | [forum:3425] |
|
I Roberto Not yet 100% sure I understood what you want, but most probably it is this kind of thing: # Create a dummy data frame of soil textures: my.text <- data.frame( "CLAY" = c(05,60,15,05,25,05,25,45,65,75,13,47), "SILT" = c(05,08,15,25,55,85,65,45,15,15,17,43), "SAND" = c(90,32,70,70,20,10,10,10,20,10,70,10), "OC" = c(20,14,15,05,12,15,07,21,25,30,05,28) ) # # Display the table: my.text # Lets say you are only interested in # points 4 and 5 # Classify according to the FAO classification classif <- TT.points.in.classes( tri.data = my.text[4:5,], class.sys = "USDA.TT" ) # # Retreive the list of classes concerned u.classif <- unique( unlist( apply( classif, 1, function(X){names(X)[X != 0]} ) ) ) # Create a vector of colors for each # possible texture classes: my.col <- rep(gray(0.9),ncol(classif)) # Change the colors of the textuer # classes concerned: my.col[ colnames(classif) %in% u.classif ] <- gray(0.5) # Plot the triangle with these new # classes colors TT.plot( class.sys = "USDA.TT", class.p.bg.col = my.col, cex.lab= 1, cex.axis=1, grid.col=gray(0.8) ) # ## grid.col is Normally not needed but ## there is a little bug ## in the code giving strange results ## otherwise! (to be corrected) Is that what you need? (there is no build in function for that purpose, but the script probably works) |
|
| RE: Welcome to Help [ Reply ] By: Roberto Barbetti on 2010-09-30 12:49 | [forum:3424] |
|
this one: to plot some texture data in a texture triangle... I work with range and not with points. I'd like to produce a STU reports with selected (coloured) polygon of soiltexture. for example the texture of XXX STU may be SiLo or Si thanks a lot |
|
| RE: Welcome to Help [ Reply ] By: Julien Moeys on 2010-09-30 11:22 | [forum:3423] |
|
Hi Robeto I am not sure I understand your question. Do you want: - customise a soiltexture plot (without data)? - to plot some texture data in a texture triangle? - to classify some texture data according to a triangle? - to retrieve the clay-silt-sand coordinates of the boundaries of some texture classes? with best Julien |
|
| RE: Welcome to Help [ Reply ] By: Roberto Barbetti on 2010-09-30 08:48 | [forum:3422] |
|
Sorry...If I have an interval soil texure ie (SiLo and Si class ). how can I access the textural triangle polygons? I star with: TT.plot( class.sys = "USDA.TT",cex.lab= 1,cex.axis=1) and then? |
|
| Welcome to Help [ Reply ] By: Stefan Theussl on 2010-04-08 18:35 | [forum:2723] |
| Welcome to Help | |

