[R] interaction plot and x axis
Dear all I am trying to make an interaction plot among 6 variables; e.g. PH to be in the x axis and the rest 5 variables in the y axis. The code that I am using is the below: The name of my file is e.g. spec so spec-read.csv(spec.csv) head (spec) str(spec) names-names(spec)[2:6] speclong - reshape(spec, idvar = id, varying = list(names), v.names=outcome,direction = long) speclong$time2-factor(speclong$time,labels=rep( ,5)) interaction.plot(speclong$PH,speclong$time2,speclong$outcome, xaxt=n, type=l, log=y, trace.label=,col=rainbow(8)) what I want is to change the labels of the x axis. If for example I don't use xaxt=n, by default it shows some values of PH e.g. 4.93, 5.97, 6.23, 6.47, 6.59, 6.77, 6.89, 7.35 but it don't show the ticks in each value. However I would like to define the x values e.g. 5.0, 5.5, 6.0, 6.5, 7.0. I used the xlim but it says error as well axis(1, at=c(5.0, 5.5, 6.0, 6.5, 7.0)) but still there is a problem. Does anyone know how I can define that? Thank you in advance. Kind regards Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] fitting a distribution to a ecdf plot
Dear all, I need to plot an cumulative distribution plot of a variable and then to fit a distribution to that, probably a weibull or lognormal. I have plotted the ecdf as plot(ecdf(x)) but I haven't managed to fit the distribution. I have as well attached the data. I would appreciate if you could help me on that. Thank you. Kind regards Maria NOECCu 67.88904443 150.1397457 186.4661306 125.4586537 164.6450167 82.26572728 46.12957405 139.3670831 77.3140337 73.71616087 89.24381267 55.49698407 161.4744795 110.9611291 103.3427988 120.978441 121.3764833 100.1028412 145.5605989 142.3290787 145.3679277 93.62492361 55.48686698 128.11105 69.65897422 77.74185999 115.8001364 50.45232492 90.35071838 132.9893917 77.72242849 64.28160263 54.01295646 83.71891269 134.0958513 64.60377903 48.18032813 130.486115 56.73379201 52.23087454 50.33847793 54.88254634 109.1721021 48.20831769 87.10977697 47.02111749 63.29204939 48.15737916 59.51869418 63.70426227 83.97669506 93.56957986 94.13697821 49.81656675 41.49804514 51.05645798 61.76354398 60.6012629 54.42093914 93.51486665 60.54396105 48.85428234 166.7654584 146.810965 80.95967487 167.2626315 59.47330368 72.86066214 116.4378185 55.64725599 121.2565064 71.47595431 133.7136451 73.82132992 137.8096239 49.83650594 81.08199187 89.36373311 47.72963718 49.02577131 54.0245052 47.18943578 106.7524366 92.86330941 107.7602873 80.46842086 203.1770731 63.47382772 106.0130281 90.67128789 85.91406122 85.65280069 129.637575 81.89671307 115.5356497 65.53656745 129.3789983 83.07309212 95.3862417 47.64942729 44.58198126 65.91324525 85.98441643 173.7522613 68.43518477 62.19982961 60.48931609 79.84400257 196.0585861 79.15253575 198.4031949 188.8371774 67.2503906 76.7620257 154.1797827 84.26522759 70.97081638 56.37466386 129.0594303 114.5855536 73.67967762 536.9946813 78.95253975 71.19112816 51.24938953 67.10699555 93.07971733 52.55033118 48.98038035 71.99776449 87.15210545 120.8311727 63.00287326 67.90228061 87.24346937 170.9653141 174.1646464 51.72208312 55.25671981 67.79918864 52.23148551 68.94684451 58.64711247 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] fitting a distribution to a ecdf plot
Actually I have already done a search on that but it was not much of a help. That is why I posted it in the r-help in case it was much more helpful. Thank you. Kind regards Maria From: David Winsemius [dwinsem...@comcast.net] Sent: 15 March 2011 16:19 To: Lathouri, Maria Cc: r-help@r-project.org Subject: Re: [R] fitting a distribution to a ecdf plot On Mar 15, 2011, at 12:00 PM, Lathouri, Maria wrote: Dear all, I need to plot an cumulative distribution plot of a variable and then to fit a distribution to that, probably a weibull or lognormal. I have plotted the ecdf as plot(ecdf(x)) but I haven't managed to fit the distribution. I have as well attached the data. Try a search on one of the R search sites with: Fitting distributions with R # use the quotes I would appreciate if you could help me on that. Thank you. Kind regards Maria example.txt__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] fitting a distribution to a ecdf plot
Hallo yes I tried it as well and it works; Thank you a lot Maria From: Dennis Murphy [djmu...@gmail.com] Sent: 15 March 2011 21:36 To: Lathouri, Maria Cc: r-help@r-project.org Subject: Re: [R] fitting a distribution to a ecdf plot Hi: The fitdistrplus package from CRAN may be useful. I tried it on your data and the lognormal seemed to fit well, apart from the outlier. I just followed the vignette that accompanies the package. library(fitdistplus) plotdist(NOEccu) # ecdf descdist(NOEccu, boot = 1000) # Cullen-Frey graph based on 1000 bootstrap samples # The Cullen-Frey graph suggests that the distribution is somewhere between a Gamma and lognormal # Weibull N1w - fitdist(NOEccu, 'weibull') # Warning messages: # 1: In dweibull(x, shape, scale, log) : NaNs produced # 2: In dweibull(x, shape, scale, log) : NaNs produced plot(N1w) summary(N1w) # Gamma N1g - fitdist(NOEccu, 'gamma') # Warning messages: # 1: In dgamma(x, shape, scale, log) : NaNs produced # 2: In dgamma(x, shape, scale, log) : NaNs produced # 3: In dgamma(x, shape, scale, log) : NaNs produced # 4: In dgamma(x, shape, scale, log) : NaNs produced plot(N1g) summary(N1g) # Lognormal N1l - fitdist(NOEccu, 'lnorm') plot(N1l) summary(N1l) Try it out and see if it suits your needs. HTH, Dennis On Tue, Mar 15, 2011 at 9:00 AM, Lathouri, Maria m.lathour...@imperial.ac.ukmailto:m.lathour...@imperial.ac.uk wrote: Dear all, I need to plot an cumulative distribution plot of a variable and then to fit a distribution to that, probably a weibull or lognormal. I have plotted the ecdf as plot(ecdf(x)) but I haven't managed to fit the distribution. I have as well attached the data. I would appreciate if you could help me on that. Thank you. Kind regards Maria __ R-help@r-project.orgmailto:R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] how to change the margins of a plot area
Dear all, I am ploting two boxplot of two chemical variables using the format boxplot(Alkalinity, logAlkalinity, log=y, col=c(lightblue), lwd=0.6, boxwex=0.3) However when I plot like this, the distance between the two boxplots is very big and as well the distance of each boxplot from the plot area, left and right. How can I minimise that distance between the boxplots and as well the distance of each boxplot from the left and right margin of the plot area? Another question is that when I write in the above ylab=Concentration, I get in the y axis as well in each tick and a number. How can I not have this but only the text? Thank you. Kind regards Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] how to change the margins of a plot area
Dear all I have attached a file in a csv format, with two variables; the code that I am using to plot the boxplots is boxplot(ALKY, CL, ylab=Concentration, lwd=0.7, boxwex=0.4) I hope this will help. Thanks Maria From: John Kane [jrkrid...@yahoo.ca] Sent: 13 March 2011 13:19 To: r-help@r-project.org; Lathouri, Maria Subject: Re: [R] how to change the margins of a plot area Hi Maria, I think we need some sample data and code to really be ablo to help. in the meantime have have a look at ?par for general plotting info. --- On Sun, 3/13/11, Lathouri, Maria m.lathour...@imperial.ac.uk wrote: From: Lathouri, Maria m.lathour...@imperial.ac.uk Subject: [R] how to change the margins of a plot area To: r-help@r-project.org r-help@r-project.org Received: Sunday, March 13, 2011, 8:15 AM Dear all, I am ploting two boxplot of two chemical variables using the format boxplot(Alkalinity, logAlkalinity, log=y, col=c(lightblue), lwd=0.6, boxwex=0.3) However when I plot like this, the distance between the two boxplots is very big and as well the distance of each boxplot from the plot area, left and right. How can I minimise that distance between the boxplots and as well the distance of each boxplot from the left and right margin of the plot area? Another question is that when I write in the above ylab=Concentration, I get in the y axis as well in each tick and a number. How can I not have this but only the text? Thank you. Kind regards Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] FW: how to change the margins of a plot area
Dear all I am sorry about that; I thought that since in R csv formats are acceptable, it will be here as well. I have attached it in a text format. I hope now it is better. Thank you Maria From: David Winsemius [dwinsem...@comcast.net] Sent: 13 March 2011 18:24 To: Lathouri, Maria Subject: Re: [R] how to change the margins of a plot area Please read the Posting Guide and note that .csv files are NOT mentioned as one of the acceptable formats for attachments to postings! On Mar 13, 2011, at 1:00 PM, Lathouri, Maria wrote: Dear all I have attached a file in a csv format, with two variables; the code that I am using to plot the boxplots is boxplot(ALKY, CL, ylab=Concentration, lwd=0.7, boxwex=0.4) I hope this will help. Thanks Maria From: John Kane [jrkrid...@yahoo.ca] Sent: 13 March 2011 13:19 To: r-help@r-project.org; Lathouri, Maria Subject: Re: [R] how to change the margins of a plot area Hi Maria, I think we need some sample data and code to really be ablo to help. in the meantime have have a look at ?par for general plotting info. --- On Sun, 3/13/11, Lathouri, Maria m.lathour...@imperial.ac.uk wrote: From: Lathouri, Maria m.lathour...@imperial.ac.uk Subject: [R] how to change the margins of a plot area To: r-help@r-project.org r-help@r-project.org Received: Sunday, March 13, 2011, 8:15 AM Dear all, I am ploting two boxplot of two chemical variables using the format boxplot(Alkalinity, logAlkalinity, log=y, col=c(lightblue), lwd=0.6, boxwex=0.3) However when I plot like this, the distance between the two boxplots is very big and as well the distance of each boxplot from the plot area, left and right. How can I minimise that distance between the boxplots and as well the distance of each boxplot from the left and right margin of the plot area? Another question is that when I write in the above ylab=Concentration, I get in the y axis as well in each tick and a number. How can I not have this but only the text? Thank you. Kind regards Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. David Winsemius, MD West Hartford, CTALKYCL 24 17 42 16.8 20 15.2 33 15.8 34 14.7 38 14.8 32 13.2 27 13.3 37 15.7 31 12.7 31 14 35 14.8 30 14.6 31 14.7 34 15.6 39 16 44 15.2 40 14.3 51 17.2 41 16.3 30 12 48 15.1 40 14 46 15.8 33 13.9 44 15.2 33 14.1 33.42520849 14.6906392 31 14.6 31 10.6 49.65524516 15.8163576 49 15 47 14.3 33 13 39 12.5 38 12.8 30 12 30 12.2 29.82656017 14.29424761 34 14.2 34 12.8 56 16 60 17.4 61 18.4 59 15.7 44 15.3 41 16.2 33 13.8 38 13 41 13.5 37 17.1 21 12.8 39 16.1 36.412.5 50.717.1 37.312.1 41.711.9 62.117.5 43.413.8 42 13.5 40 14.1 40.16876216 15.9 36.48094861 16.4 41.4029284 15.5 55.16932486 17 56.74926517 17.2 40.75086976 14.9 57.92527479 15.5 61.0741 16.4 47.58835403 15.8 26.78666719 19.8 29.11069914 18.5 43.89296089 15.7 29.80014395 15.3 45.43326189 17.9 21.52111069 14.8 34.28668871 16.3 51.33203813 15.4 61.16524423 19.1 33.08808335 16 28.45357602 13.1 46.95762322 15 41.2184536 14.6 41.67606216 14 34.53359965 17.6 34.88690373 17.4 34.61562996 15.5 44.29030259 17 39.68692169 16.3 39.43498713 19.5 37.04679913 16.6 58.97385637 16.1 44.08944815 14.9 42.07100781 13.8 40.29932265 15.4 43.10896392 16.6 34.27550906 13.6 28.53052378 11.9 46.85048052 15.9 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] please help with interaction.plot
Dear all I have the following code to produce a graph of 5 different variables in the same graph; however when I follow it in the end it produces the plot of the 5 variables and a legend in right but the problem is that the legend is too close to the margin of the plot and when I try to write the text for each line it does not fit. How can I change the location of the legend to be placed a little bit to the left? example-read.csv(file=example.csv) example$date-as.Date(example$Date,format=%d/%m/%Y,order=dmy) head(example) str(example) names-names(example)[2:5] examplelong - reshape(example, idvar = id, varying = list(names), v.names=outcome,direction = long) examplelong$time2-factor(examplelong$time,labels=rep( ,4)) d3-c((examplelong$date[1]),(examplelong$date[103])) d4-as.Date((d3[1])+150*(0:20)) interaction.plot(examplelong$date, examplelong$time2,examplelong$outcome,xaxt=n,type=l,pch=20,xlab=, log=y, ylab=expression(paste(Concentration~(~mu~g/L))), trace.label=,col=rainbow(4)) Thank you Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] barplot with errorbars
Dear all I have six variables of the average metal concentrations Var1 4.77 Var2 23.5 Var3 5.2 Var4 12.3 Var5 42.1 Var6 121.2 I want to plot them as a barplot with error bars. Could you help me? Cheers Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] please help-DTK package
Dear all I am trying to do a multiple pairwise comparison test with Tukey-Kramer test as I have unequal sample sizes and variance. I have downloaded the DTK package from CRAN website in my computer for Windows, however I have difficulties in installing it in R. I have unzipped the compressed file in my computer and then I open R, I try to install the package through File - Source R code - DTK but there is always an error. Could you please help me? I can't understand what I am doing wrong. Thank you. Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] add error bars in a plot
Dear all I have a dataset of how metal concentrations change through time. I have made a plot of date versus metal concentration. However I want to add error bars in the plot. Could you help me? Thanks Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Uncertainty analysis
Dear all I would like to run in R an uncertainty/sensitivity analysis. I know that these two are performed together. I have a geochemical model where I have the inputs, the water variables (e.g. pH, temperature, oxygen ect) and as well an output of different variables. What I would like to do is to estimate the uncertainty that the output variables have considering the uncertainty of the input variables as well how the variations of my inputs contribute most to the variations of my output (probably though the sensitivity analysis). I was thinking perhaps with Monte Carlo analysis. Is there a way to do that? Thanks a lot. Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] change the type of lines and colours in interaction.plot
Dear all, I want to plot 8 chemical variables in the same plot. I have used the interaction.plot command: interaction.plot(speclong$Date,speclong$time2,speclong$outcome,xaxt=n,type=l,pch=20,xlab=, log=y, ylab=Concentration (ug/L),trace.label=,col=rainbow(8)) However, what it gives me is dotted lines and the colours are very fade. I was wondering if I can change the lines to be solid and as well to specify for each line the colour that I want. Thanks a lot. Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] specify axis range
Dear all, I want to make a plot where I can specify the range of y axis. I am using the interaction.plot command and because the values of y axis are from 2 to 500, I am using a logarithmic scale. interaction.plot(speclong$Date,speclong$time2,speclong$outcome,xaxt=n,type=l,pch=20,xlab=, log=y, ylab=Concentration (ug/L),trace.label=,col=rainbow(7)) The plot itself gives me a y scale displaying ticks at 2, 5, 10, 20, 100, 200, 500. I would like to get a y scale where it would display ticks at every 4 marks, at 2, 20, 100 and 500. I tried ylim=c(2,20,100,500) but nothing happened. Actually I got an error. Could you help me? Thank you. Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] superscript in ylab
Dear all I am doing some plots in R. I want to have as label in y-axis Temperature (oC). I have used ylab=expression(paste({Temperature} ^o*C)) but what I get is TemperatureoC. How can I have a space between Temperature and the units and also the units to be in brackets? Many thanks Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] plot dates in x-axis
Hallo, I am trying to plot dates in x-axis. The format of my dates are in dd/mm/. At first I install zoo package. After R reads my file, I change the default format of dates to the format that I have, myfile-read.csv DATE-as.Date(DATE,format=%d/%m/%Y) up till now everything goes ok; when however I go and plot for example plot(DATE, Discharge) in the x-axis I only get the years, 1998, 2000, 2002... How can I see in the x-axis the whole format of the dates that I have e.g. 29/01/1998? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Trendline and R square value
Hi I would like to display the trendline and the R-square value in a xy scatter in R. For example if I want to plot f vs g I add the trendline using the commands below library(quantreg) plot(f,g) abline(rq(g~f)) however I don't know how to display the R2 in the graph. Thank you in advance. Kind regards Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Time plots
Dear all, I want to do some time plots and actually the dates are in the format of dd/mm/. So first I input my dataframe in R in a csv form. What I do is DF-read.csv(C:/Documents and Settings/DF.csv) DATE-as.Date(DATE, %d/%m/%Y) # to tell R that DATE column is indeed dates with(DF, plot(DATE,pH)) Until here it works fine, but I have the graph plotting only the points. What I want is to have a line (join these points) so to have a time plot. I have tried different commands such as lines(DATE,pH) or with(DF, lines(DATE,pH) but nothing works. What can I do? Yours Lathouri Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Boxplots with different variables and different ranges in R
Dear all, I am trying to make boxplots in one diagram but it is not working. Actually I have a large dataset, around 35 water quality variables with different units and of course in different ranges (some are orders of magnitude bigger than others). I want to produce one diagram with all the boxplots of the variables of my dataset. I tried these series of commands: oldpar - par(mfrow=c(1,ncol(R))) invisible(apply(R, 2,boxplot)) for (i in 1:ncol(R)) boxplot(R[,i], main=colnames(R)[i]) par(oldpar) (where R is the name of my dataset) The problem is that after the second command, there is an error in plot.new( ): figure margins too large. Is there a way to overcome this and put all my variables in a same diagram? I tried with less number of variables, but I had the same warning. Thank you very much for your time and help. Kind regards Maria Lathouri [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Enquiries about time plots in R
Dear all, My name is Maria Lathouri and I am currently doing a PhD at Imperial College of London about time series of environmental variables in surface waters. I am trying to do some time plots with R but it seems that it is not working. The problem is that the time is not regular, for example, a small dataset can be seen below: Date pH 1/02/1998 5.5 5/03/1998 5 8/12/1998 6 1/02/1999 6.1 ... 08/10/20007.2 I have used the function plot(DATE, pH) and then lines(pH), but the line does not join the points. I have used many combinations, e.g. plot(DATE, pH) and then lines(DATE, pH), where I get a plot with full of lines inside or just plot(pH) and then lines(pH) where the line connects the points but in x-axis I do not have the DATE. It says Index from 0 to 80. Do you know if there is a function where I can have in x-axis the DATE (irregular dates) and in y-axis the variable with a continuous line, showing how it changes through time? I know that your time is valuable but I would appreciate it if you could help me. Thank you very much in advance for your time and help. I am looking forward to hearing from you. Sincerely yours Lathouri Maria [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.