Re: [R] unique scale color ggplot2

2020-07-08 Thread Catalin Roibu
Dear all, Thank you for your email and help. I solved the problem! All the best! Catalin On Tue, 7 Jul 2020 at 20:43, Rasmus Liland wrote: > On 2020-07-07 19:23 +0200, Thierry Onkelinx wrote: > > > > Don't use the cut() function. > > Ah, I see it now. Changing > > fill = cut(cor,

[R] unique scale color ggplot2

2020-07-07 Thread Catalin Roibu
Dear R users, I want to create a plot for multiple sites and to keep the same color range scale (the correlation values range from -0.5 to 0.7 for all data, but I have sites with different min and max). I used this code: cols<-c("#0288D1", "#039BE5", "#03A9F4","#29B6F6", "#4FC3F7", "#FFCDD2",

[R] consecutive n values

2020-06-04 Thread Catalin Roibu
Dear R users, Please help me to detect consecutive n values in R and their interval. rle.seq1<-rle(reco$extr) cbind(rle.seq1$values) index<-any(rle.seq1$values=="DRY"$lengths>=3) cumsum(rle.seq1$lengths)[index] reco is a data frame with 2 columns (year and values (DRY, WET). I want to have

[R] (no subject)

2019-04-18 Thread Catalin Roibu
Dear R users, I want to compute a nlm for each plot an species and after that to save the regression coef for each species and plot. Thanks for your help! I tried something like this s<-data.frame(unique(ah$sp)) pl<-data.frame(unique(ah$plot)) z<-data.frame(matrix(nrow=0, ncol=5)) for(i in

[R] replicate rows

2018-07-08 Thread catalin roibu
Dear R users, I want to replicate sampled rows in data frame. The sampling results must be in this form: a b Rep [1,] 3 4.0 R1 [2,] 6 8.0 R1 [3,] 1 0.1 R2 [4,] 6 8.0 R2 [5,] 1 0.1 R3 [6,] 5 7.0 R3 I have a code but I didn't succeed to insert to rep column. This is my code:

[R] R 3.4.0 problem installation

2017-04-25 Thread catalin roibu
Dear all, I have a problem with the newest R version. I'm trying to install a specific package dplR how need the gpm package and I have this error on my macbook (OS Sierra): > install.packages("dplR") also installing the dependency ‘gmp’ Packages which are only available in source form, and may

Re: [R] Gaussian Filter

2017-02-08 Thread catalin roibu
Dear all! ​I know that! I need only the Gaussian filter, as for the rest is simple. <https://mailtrack.io/>Sent with Mailtrack <https://mailtrack.io/install?source=signature=en=catalinro...@gmail.com=22> On 8 February 2017 at 09:58, catalin roibu <catalinro...@gmail.com&

[R] Gaussian Filter

2017-02-07 Thread catalin roibu
Dear all! Please help me with a script or package to compute a Gaussian filter. I have a time series (like average mean temperature from 1901-2014) and I want to extract low, high and band pass frequencies using a Gaussian filter with 32 years window. Thank you very much! Best regards! Catalin

[R] adding points in plot loop

2016-03-23 Thread catalin roibu
Dear R users, I have a dataframe with 6 columns and I want to create a plot (with for loop). My question is how to add points in the for loop? I tried this code, but without success. vv<-rbind(colnames(ext)) for(i in 1:ncol(vv)){ with(ext, plot(rownames(ext), ext[,i], type="p",las=1,

Re: [R] difference between successive values

2016-03-04 Thread catalin roibu
@univ-nantes.fr> wrote: > >Hi, > > > >(1) You should provide a minimal working example; > > > >(2) But anyway, does... > > > >x = sample(10) > >c(x[1],diff(x)) > > > >... do what you want? > > > >Olivier. > > > &

[R] difference between successive values

2016-03-04 Thread catalin roibu
Dear all! I want to calculate difference between successive values (cumulative values) with R. I used diff function, but I want to keep the first values. Please help me to solve this problem! Thank you! Best regards! CR -- - - Catalin-Constantin ROIBU ​ Lecturer PhD, Forestry engineer

Re: [R] distribution freq

2016-02-26 Thread catalin roibu
(pgamma(c(96,8), shape, rate)) I obtaining the same values for all classes. Thank you very much for your help! Best regards! On 26 February 2016 at 14:41, Duncan Murdoch <murdoch.dun...@gmail.com> wrote: > On 26/02/2016 4:09 AM, catalin roibu wrote: > >> I'm working in forestry

[R] distribution freq

2016-02-25 Thread catalin roibu
Dear all! I want to apply gamma distribution to a data set. I obtained ty pdf values and I want to transform this values in absolute frequencies. I used dgamma, without success. Please help me to solve this problem. Best regards! CR -- - - Catalin-Constantin ROIBU ​ Lecturer PhD, Forestry

[R] middle of interval

2016-02-08 Thread catalin roibu
Dear R users! I have a data frame with first column is an interval (1902-1931) and I want to find the middle of the interval? Is there a possibility to do that in R? Thank you very much! Best regards! -- - - Catalin-Constantin ROIBU ​ Lecturer PhD, Forestry engineer Forestry Faculty of

[R] idl code in R

2015-09-18 Thread catalin roibu
Dear all, Is there a possibility to compile an IDL code in R? If yes please tell me how to do that. Thank you very much! best regards! CR [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

[R] stripchart

2015-04-06 Thread catalin roibu
Dear all! I have a problem! I want to plot temperature anomalies per months until 1901-2014. For this I want to make a stripchart. I used the specified command, but I want to plot the extreme values with full dots above 90th and bellow 10th percentile, and the normal values with hallow dots.

Re: [R] stripchart

2015-04-06 Thread catalin roibu
original data are something like that: structure(list(year = 1901:2013, J = c(1.547878, -1.100605, -0.4222952, -1.221505, -0.2250523, -0.1260924, -0.6251569, -0.7348371, 0.9646313, 1.21345, 0.9746932, 0.5155271, -0.3323591, -0.6689715, 0.8461724, 1.772659, 1.436295, -1.108881, -1.196227,

Re: [R] stripchart

2015-04-06 Thread catalin roibu
, 1.065047, 0.9980727, 0.935714, 1.137962, -1.070733, 1.876622, -1.579149 )), .Names = c(year, J, F, M, A, M.1, J.1, J.2, A.1, S, O, N, D), class = data.frame, row.names = c(NA, -113L)) On 6 April 2015 at 22:58, catalin roibu catalinro...@gmail.com wrote: original data are something like

[R] time series decompose

2015-01-20 Thread catalin roibu
Dear all, I have a time series (years with n column's) and I want to decompose this time series in high, low and bandpass components using a n-years filter (in my case 20 years). Until now I tried many libraries such as mFilter, signal, spectral.methods, but unfortunately without success. Please

[R] wave length dependent calibration

2015-01-16 Thread catalin roibu
Dear all, Is there a possibility to perform in R wave length dependent calibration analysis? I want to decompose a time series into high, low and band pass components using a n-years smoothing spline. Thank you very much! Best regards! -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry

[R] neighborhood competition index in r package

2014-12-07 Thread catalin roibu
Dear all! Is there a R package to compute neighborhood competition index (Shutz, Hegyi, and many index). Thank you very much! -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230

[R] replace duplicates with 0

2014-03-13 Thread catalin roibu
Dear all! Is there a possibility to replace all duplicates values in data frame with 0? Thank you very much! -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230 52 29 78, ext.

[R] change date format

2014-03-13 Thread catalin roibu
Dear all! I have a new problem with the date format in a data frame. I have rainfall records extracted from an automatic meteo station. In the same data frame (with 1 records) the date is in 2 formats like that: 4/15/11 11:49 AM 5.6.11 2:51 PM My question is how to modify date format for all

[R] grab values in R

2014-03-11 Thread catalin roibu
Hello all! I have a problem with R. How can I do this assemble the ELM PRP for each ua. My data is like this: ua ELM PRP 122C MO 5 122C BR 3 122C FA 1 122C MO 1 122D BR 7 122D MO 2 122D BR 1 and I want to obtain something like this: ua ELM PRP 122C MO 6 122C BR 3 122C FA 1 122D BR 8

[R] summarize data

2014-03-11 Thread catalin roibu
Hello again, I have a problem with R. How can I do this summarize the proportion (PRP) of unique species (ELM )for each ua. My data is like this: uaELMPRP122CMO5122CBR3122CFA1122CMO1122DBR7122DMO2122DBR1 and I want to obtain something like this: uaELMPRP122CMO6122CBR3122CFA1122DBR8122DMO2

[R] Remove lattice panel

2014-03-05 Thread catalin roibu
Dear all, Is there a possibility to remove the panel (with names) from a lattice plot? Thank you very much for your help! --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230 52 29

[R] R multiplot problem

2014-02-19 Thread catalin roibu
Dear R users, I have a problem in R plot. I want to plot a multipanel chart (eg 4 subplots like in the following code), but I want to remove the line of the first 3 x axis, without break the multipanel box. Is there a possibility to succeed? Thank you very much! #Generate the data for the four

[R] multiplot contour

2014-02-19 Thread catalin roibu
Dear R users, I have a multiplot graph in R (in the following code), but I don't know how to make (draw ) a contour line for entire multipanel. Please help me to solve this problem. Thank you very much! #Generate the data for the four graphs x - seq(1, 50, 1) y1 - 10*rnorm(50) y2 -

[R] multitaper power analysis

2014-01-03 Thread catalin roibu
Dear all, I have a big problem with R. I want to make a multitaper power spectrum analysis of a time series using 3 tapers and a resolution of two years with robust background noise estimation. I try different packages but unsuccessful. library(multitaper) d-spec.mtm(CAMstd, nw=2,

[R] MTM power spectrum

2013-12-30 Thread catalin roibu
Dear R users, I have a big problem with R. I want to make a multitaper power spectrum analysis of a time series using 3 tapers and a resolution of two years with robust background noise estimation. I try different packages but unsuccessful. library(multitaper) d-spec.mtm(CAMstd, nw=2,

[R] Anova split by factors

2013-11-18 Thread catalin roibu
Hello R-users, I have a problem with Anova in R and I don't know how to solve that. I want to compute Anova for each experiment (exp). I try this code: test-lapply(split(eg,eg$Exp),function(x) aov(masa.uscat.tr ~ Clona,data = x)) or test-by(eg,eg$Exp, function(x) aov(masa.uscat.tr~Clona,data=x))

[R] Tukey test for anavo split by multiples factors

2013-11-18 Thread catalin roibu
Hello all! I have a problem with Anova in R and I don't know how to solve that. I want to compute Anova for each experiment (exp). I use this code: test-lapply(split(eg,eg$Exp),function(x) aov(masa.uscat.tr ~ Clona,data = x)) or test-by(eg,eg$Exp, function(x) aov(masa.uscat.tr~Clona,data=x)) I

[R] extract column's from different dataframe

2013-10-17 Thread catalin roibu
Dear R users, I want to extract column's from different data frame with different row length. How can I do this in R? Thank you very much! best regards! CR -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229,

[R] extract regression coefficients

2013-10-15 Thread catalin roibu
Hello all! I have a problem with R. I want to extract regression coefficients from summary and use it for compute the theoretical values. How can I do that in R? thank you! best regards, -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str.

[R] SPI package error

2013-08-28 Thread catalin roibu
Dear all! I find a problem from SPI package. When I try a 6 months scale I have this error: write.table(test,file=spi.txt,quote=FALSE,row.names=TRUE) spi3-spi(6,spi.txt,1902,2009) Error in paste(title, sep = ) : argument title is missing, with no default If I use 3 months scale everything is

[R] find row name with specific value

2013-08-27 Thread catalin roibu
Hello all! I want to find the first year where is fixed value (eg 2). My data is like this: HUMstdHUMres samp.depth 1592 0.5687519NA 1 1593 1.5251896NA 1 1594 1.8168727NA 1 1595 1.1265923 0.8253599 1 1596 0.8725422 0.7423323

[R] transform row name in first column variable

2013-08-27 Thread catalin roibu
hello all! I have a problem! I don't know how to convert row names in first column variables. Thank you very much for your help! CR -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone

[R] arbitrary subset of dataframe

2013-08-26 Thread catalin roibu
Dear all! I want to arbitrary subset a data frame by variables. I try this code, but the subset work only for rows, but I want to subset by variables. # sample without replacement mysample - df[sample(1:ncol(df), 50, replace=FALSE),] Please help me to solve this

[R] transform variables

2013-08-26 Thread catalin roibu
Dear all! I have a data frame composed by 13 columns (year, and 12 months). I want to transform this data base in another like this year month values 1901 1 1901 2 1901 3 . 1901 12 1902 1 1902 2 1902 12 Is there a possibility to succeed that in R? Thank you! best regards! CR --

[R] spatstat output

2013-07-07 Thread catalin roibu
Dear R users, Is there a possibility to extract only the r, CI's envelope and L function from the output of spatstat? I use this code E - alltypes(df1, Kest, nsim = 100, envelope = TRUE,savepatterns=TRUE,correction=isotropic) And second question, is there a possibility to modify the margin of plot

[R] iterative methods

2013-07-04 Thread catalin roibu
Dear R users, Please help me with some documentation for newbie about R programming, algorithms, create iterative C++ function (like for, while, if , etc). Thank you very much! -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no.

[R] data manipulation

2013-05-15 Thread catalin roibu
Hello all! I have a problem with my data. My initial data is a list years and months (see below). I want to transpose my data (12 rows (months) and year values as column). I try t(spi3), but the year values do not appear as column names, but as values. Please help me to solve this problem! Thank

[R] x and y lengths differ

2013-05-15 Thread catalin roibu
I have a problem with R. I try to compute the confidence interval for my df. When I want to create the plot I have this problem: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ. I try this code: library(dplR) df.rwi - detrend(rwl = df, method = Spline,nyrs=NULL)

[R] condition and function

2013-05-13 Thread catalin roibu
Hello all! I want to create a new variable in a dataframe, and this variable is based on a regression equation. For example for example for the hc=10, the values of the new variable(d0.3) is obtained by d0.3=15.9122+0.2105*dc, for hc=30, d0,3 values are obtained by d0.3=1.4781+0.8827*dc. Thank

[R] SSbiexp

2013-04-23 Thread catalin roibu
Hello all! I have a problem to use a biexponential regression model: I use this code: n3-nls(proc~SSbiexp(cls,a,b,c,d),data=bline) and this is the error message: Error in nls(y ~ cbind(exp(-exp(lrc1) * x), exp(-exp(lrc2) * x)), data = xy, : singular gradient My data is like this:

[R] double exponential regression R

2013-04-21 Thread catalin roibu
Hello all! I have a problem with a double exponential equation. This are my data's structure(list(proc = c(1870.52067384719, 766.789388745793, 358.701545859122, 237.113777545511, 43.2726259059654, 148.985133316262, 92.6242882655781, 88.4521557193262, 56.6404686159112, 27.0374477259404,

[R] non linear equation

2013-04-10 Thread catalin roibu
Hello all! I have a problem with a double exponential equation. this are my data's structure(list(proc = c(1870.52067384719, 766.789388745793, 358.701545859122, 237.113777545511, 43.2726259059654, 148.985133316262, 92.6242882655781, 88.4521557193262, 56.6404686159112, 27.0374477259404,

[R] count by value

2013-04-09 Thread catalin roibu
Hello all! I have a big problem now. I want a data frame like this: dput(head(test,100)) structure(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,

[R] group data in classes

2013-04-07 Thread catalin roibu
Hello all! I have a problem to group my data (years) in 10 years classes. For example for year year decade 1598 1590-1600 1599 1590-1600 1600 1590-1600 1601 1600-1610 --- my is like this [1] 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 [16] 1613 1614 1615

[R] R ecuatia error

2013-04-07 Thread catalin roibu
Dear all! I have a problem when I use this equation with R. mpr - 843.75*exp(-1.119*pg) Error in FUN(left, right) : non-numeric argument to binary operator pg 01 02 03 04 05 06 07 08 09-236 10-63T 11 12 13 14 15 16 17-234 18 19 20 23 1592 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA

[R] arrange data

2013-04-06 Thread catalin roibu
Hello all! I have a problem to arrange data in another form. My initial data is like this: 'data.frame': 421 obs. of 58 variables: $ 01A: num NA NA NA NA NA NA NA NA NA NA ... $ 01B: num NA NA NA NA NA NA NA NA NA NA ... $ 03A: num NA NA NA NA NA NA NA NA NA NA ... $ 03B: num NA NA NA NA

[R] polygon error

2013-04-01 Thread catalin roibu
Hello all! I have a problem to draw a polygon with R. My data is like this Year Nb.series Perc.pos Perc.neg Nature RGV_mean RGV_sd neg poz 1 1901 1 0.00 0.00 0 4.29 NA 0.00 0.00 2 1902 1 100.00 0.00 1 16.47 NA 0.00 100.00 3 1903 1 100.00 0.00 1 31.31 NA 0.00 100.00 4 1904 1 0.00 0.00 0 -9.62

[R] test

2013-04-01 Thread catalin roibu
Sorry for this message it's just a test. Thank you! -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230 52 29 78, ext. 531 mobile phone +4 0745 53 18 01

[R] overlaping barplot

2013-04-01 Thread catalin roibu
Hello all! I want to make a barplot with ggplot2. I want to view in the same chart the semn values (significant values (pointer over 50)). I try this code, but only for pointer values. ggplot(data, aes(x = Year, y = pointer)) + geom_bar(stat=identity) please help me with this problem. I use

[R] ggplot2 label

2013-04-01 Thread catalin roibu
Hello all! I have a problem to plot label (Year) only for significant values (in this case spoz and sneg). I use this code, but don't work with labels. library(ggplot2) ggplot(data1, aes(x = Year, y = value,fill=type,width=1))+ geom_bar(stat=identity,position=identity)+

[R] ggplot label problem

2013-04-01 Thread catalin roibu
Dear R users, I have a problem to plot label (Year) only for significant values (in this case spoz and sneg). I use this code, but don't work with labels. library(ggplot2) ggplot(data1, aes(x = Year, y = value,fill=type,width=1))+ geom_bar(stat=identity,position=identity)+

[R] ggplot2 label problem

2013-04-01 Thread catalin roibu
I have a problem to plot label (Year) only for significant values (in this case spoz and sneg). I use this code, but don't work with labels. library(ggplot2) ggplot(data1, aes(x = Year, y = value,fill=type,width=1))+ geom_bar(stat=identity,position=identity)+ scale_y_continuous(breaks =

[R] problem with data

2013-03-29 Thread catalin roibu
Hello all! I have a problem with my data in R. When I want to plot the following data, I have a problem with y scale. The maximum value is cc. 10 degrees and in R is about 100. I use this code: fasy-read.table(gridd1.txt,sep=\t,dec=,,header=T,row.names=1) # here are the years: x -

Re: [R] problem with data

2013-03-29 Thread catalin roibu
hello all! I solve the problem! Sorry for disturbing! Best regards, CR On 29 March 2013 11:28, catalin roibu catalinro...@gmail.com wrote: Hello all! I have a problem with my data in R. When I want to plot the following data, I have a problem with y scale. The maximum value is cc. 10

[R] animated charts

2013-03-27 Thread catalin roibu
Hello all! I want to create animated chart of temperature variation in last century. how can I do this with R? Thank you! -- --- Catalin-Constantin ROIBU Forestry engineer, PhD Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230 52 29 78,

[R] ggplot2 problem

2013-03-14 Thread catalin roibu
Hello all! I have a problem with ggplot2 library. I want to do an heat map and the y variables are the year months. If I use the following code, he y values are in alphabetical order, but I want it in month order. The code is: library(reshape) library(ggplot2) library(scales) p - ggplot(data.m,

[R] merge datas

2013-03-13 Thread catalin roibu
Hello all! I have a problem with R. I try to merge data like this: structure(c(2.1785, 1.868, 2.1855, 2.5175, 2.025, 2.435, 1.809, 1.628, 1.327, 1.3485, 1.4335, 2.052, 2.2465, 2.151, 1.7945, 1.79, 1.6055, 1.616, 1.633, 1.665, 2.002, 2.152, 1.736, 1.7985, 1.9155, 1.7135, 1.548, 1.568, 1.713, 2.079,

[R] extract values

2013-03-12 Thread catalin roibu
Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]1820,]-x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425, 1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074, 1.618,

Re: [R] extract values

2013-03-12 Thread catalin roibu
at 1:50 PM, catalin roibu catalinro...@gmail.com wrote: Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]1820,]-x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425

[R] top 10 (n values) for each classes

2013-02-10 Thread catalin roibu
Dear R users, I have a problem. I don't know how to select the top 10 (n) values for each classes. Thank you! My data is like this: row.names proc cls 7271 568,03338 0,5 7270 554,68458 0,5 7269 510,20638 0,5 7268 485,59969 0,5 7267 421,92852 0,5 7272 410,12101 0,5 3414 409,71429 0,5 3452

[R] compute exponential model with R

2013-02-10 Thread catalin roibu
Dear R users, Please help me to compute an exponential model with R. Thank you! -- --- Catalin-Constantin ROIBU Forestry engineer, PhD Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230 52 29 78, ext. 531 mobile phone +4 0745 53 18 01

[R] exponential model in R

2013-02-10 Thread catalin roibu
Dear R users, I don't know how to compute an exponential model like this: proc=a*exp(b*cls), or proc=a*exp(b*cls)+c*exp(d*cls). Please help me to solve this problem! Thank you! My data is: row.names proc cls 1 0.5 452.616206 0.5 2 1 255.864021 1.0 3 1.5 150.885316 1.5 4 2 86.289600 2.0 5 2.5

[R] plot residuals per factor

2013-01-08 Thread catalin roibu
Dear R-users, I want to plot residuals vs fitted for multiple groups with ggplot2. I try this code, but unsuccessful. library(plyr) models-dlply(dat1,d,function(df) mod-lm(y~x,data=df) ggplot(models,aes(.fitted,.resid), color=factor(d))+ geom_hline(yintercept=0,col=white,size=2)+

[R] group variables in classes

2013-01-04 Thread catalin roibu
Dear R users, I want to group the d values in classes. If I use this script I have a problem. classes - function(x, n){ s - seq(0, ceiling(max(x)), by = n) factor(n*findInterval(x, s), levels = s) } z-sapply(tapply(t$d,t$plot,function(x) classes(t$d, 4)),table) z-cbind(z) Thank you! Initial

[R] r code

2013-01-03 Thread catalin roibu
I have a problem. My data is now in this form: plot area d 1 0.01 34.6 ... 100 0.01 15.7 First, I want to aggregate plots start from a plot in the center of sample (10 plots x 10 plots). I want to aggregate after the model plot1 in the center of area (0,01 m2), after

[R] Sas by function in R

2013-01-02 Thread catalin roibu
Hello, It's an alternative to use SAS by function in R? I want to plot d histograms by plot.from example bellow: Thank you! plot d 1 1 16.3 2 1 25.0 3 1 57.8 4 1 17.0 5 2 10.8 13 2 96.4 17 3 76.0 18 3 32.0 19 3 11.0 20 3 11.0 24 3

[R] group values in classes

2012-12-31 Thread catalin roibu
Dear R users, I want to group numerical values in classes with different size and count the values for each classes. My data is in this forma: d 15 12,5 30,4 20,5 80,4 100,5 8,2 40,5 33 21 11 And I want the group them in classes with 4 (5,etc) cm size like this: class d 16 16

[R] remove NA or 0 values

2012-11-28 Thread catalin roibu
Dear R users, I want to remove zero's or NA values after this model. year value1 value2 1854 0 12 1855 0 13 1866 12 16 1877 11 24 year value1 value2 1 12 12 2 11 13 3 16 4 24 Thank you! -- --- Catalin-Constantin ROIBU Forestry engineer, PhD Forestry Faculty of Suceava Str. Universitatii no.

[R] aggregate combination data

2012-11-14 Thread catalin roibu
Dear R users, I want to aggregate all *d *data from all combination of n *plots* taken by k. Thank very much! My data is like that: plot d 1 14 1 13 1 12 1 14 1 18 1 20 1 21 1 43 1 108 1 43 2 41 2 61 2 83 2 61 2 84 2 45 2 21 2 12 2 11 ... 100 10

[R] aggrete data from combination

2012-11-14 Thread catalin roibu
Dear R users, A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I want all diameters values for different combination of plots. For example I want all d values for all posible combination, 100C2 (all d values for plot 1 with all d values in the plot 2...with all d values

[R] multiple variable basic plot

2012-11-11 Thread catalin roibu
Dear R users, I have a problem with plot option in R. I want to plot all columns values in a single graph and the labels of x axis the row names. I try to use matplot option, but I have a problem with labels and thickness. I use a very complex data with 100 columns and 406 rows. I use this code:

[R] plot matrix

2012-11-11 Thread catalin roibu
Dear R users, I have a problem with plot option in R. I want to plot all columns values in a single graph and the labels of x axis the row names. I try to use matplot option, but I have a problem with labels and thickness. I use a very complex data with 10 columns and 406 rows. I use this code: