[R] Question of nlme package

2009-04-28 Thread Helen Chen
Dear R user I would like to run some panel regressions with R. Therefore I want to use fixed effect model. I consulted nlme package pdf. Unfortunately I couldn't find anything clear example about fixed effect model. Is there any defined function to calculate panel data under fixed effect

[R] need some help finding power in test about variances

2009-04-28 Thread ati sundar
Hello All I am new to this list. I have a problem where for a single sample drawn from normal population, null hypothesis is that variance = k (say). Alternative hypothesis is variance k. Now if we know the true variance, then I would like to calculate the sample size required to produce

Re: [R] Generalized linear models

2009-04-28 Thread mathallan
Thanks for the answer David Sum er the sum insured the maximal loss of the company. Claims, is the actually claim size. Group is wich type of business is insured. Can you help me to solve the problem? It is very difficult to determine rightness since you have omitted essential background

[R] Processing POST data with brew?

2009-04-28 Thread Martijn Ras
Heya Folks, I've got to process a form that contains variable series of values, which i want to collect into a vectors. Say the first series has ten values, with id's ranging from X1 to X10, currently i process them in the following hardcoded manner: x1 - c(as.numeric(POST$X1),

[R] kernlab - custom kernel

2009-04-28 Thread Vivek Dikshit
hi, I am using R's kernlab package, exactly i am doing classification using ksvm(.) and predict.ksvm(.).I want use of custom kernel. I am getting some error. # Following R code works (with promotergene dataset): library(kernlab) s - function(x, y) { sum((x*y)^1.25) } class(s) - kernel

Re: [R] R: constrained optimization

2009-04-28 Thread Patrick Burns
A genetic algorithm would probably be a pretty good choice for this problem. It is not in a package, but you can get the code for the 'genopt' function from S Poetry on the public domain page of www.burns-stat.com. However, I think I understand enough of the problem to predict that a bespoke

[R] Finding rows common to two datasets

2009-04-28 Thread Steve Murray
Dear all, I have 2 data frames, both with 14 columns of data and differing numbers of rows. The first two columns are 'Latitude' and 'Longitude'. I want to find the pairs of Latitude and Longitude coordinates which are common to both datasets, and output a new data frame which is composed of

Re: [R] Finding rows common to two datasets

2009-04-28 Thread Umesh Srinivasan
Dear Steve, Try ? intersect and see if that might help. Cheers, Umesh On Tue, Apr 28, 2009 at 1:29 PM, Steve Murray smurray...@hotmail.comwrote: Dear all, I have 2 data frames, both with 14 columns of data and differing numbers of rows. The first two columns are 'Latitude' and

Re: [R] refit with binomial model (lme4)

2009-04-28 Thread Eric Elguero
On Mon, 2009-04-27 at 08:30 -0500, Douglas Bates wrote: This is related to using the matrix form of the response for a binomial glmm. The refit method for a model fit by lmer is based on a numeric vector response. thank you for this explanation. Is it possible to use the expanded form

[R] I can't install dprep

2009-04-28 Thread Grześ
When I want to install dprep and I always get information: install.packages(dprep) Warning in install.packages(dprep) : argument 'lib' is missing: using 'C:\Users\Documents/R/win-library/2.8' --- Please select a CRAN mirror for use in this session --- Warning message: package ‘dprep’ is not

[R] Matrix manipulation

2009-04-28 Thread Tammy Ma
From: metal_lical...@live.com To: r-help@r-project.org Subject: About Matrix Date: Tue, 28 Apr 2009 11:28:43 +0300 Hi, Dear R users, I have a question: I have A matrix which is 11519X14 and B matrix which is 1764X14, How do I get C matrix which is The remaining matrix after

[R] Change font type PNG device with Lattice xyplot

2009-04-28 Thread RBlonk
Dear All, I have some problems with changing the default font (Arial) in a xyplot which is printed using the PNG-device. Although some things have been mentioned about this in the forum, I still couldn't figure it out. Can someone help me out?n Thanks in advance! I want to print the plot for

[R] About Matrix

2009-04-28 Thread Tammy Ma
Hi, Dear R users, I have a question: I have A matrix which is 11519X14 and B matrix which is 1764X14, How do I get C matrix which is The remaining matrix after removing B from A? Thanks a lot. Kind regards, Tammy _ More than

Re: [R] About Matrix

2009-04-28 Thread Martin Maechler
TM == Tammy Ma metal_lical...@live.com on Tue, 28 Apr 2009 11:28:43 +0300 writes: TM Hi, Dear R users, TM I have a question: TM I have A matrix which is 11519X14 TM and B matrix which is 1764X14, TM How do I get C matrix which is The remaining matrix after removing

Re: [R] R-Help

2009-04-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 27.04.2009 19:29:35: Good Day! Could you please help us with R language? Our question is to learn editing in the R editor. While typing in the R- editor, how can we make changes if we typed something wrong in the previous UP arrow?

Re: [R] Question of nlme package

2009-04-28 Thread Dieter Menne
Helen Chen 96258011 at nccu.edu.tw writes: I would like to run some panel regressions with R. Therefore I want to use fixed effect model. The focus of lme is on mixed models, but gls in nlme can handle fixed-only problems. I doubt, however that it is exactly what you want for your case. I

Re: [R] Setting R not to try to contact a CRAN repository

2009-04-28 Thread Dieter Menne
Richard Croy Richard.Croy at fonterra.com writes: I have a computer running R that cannot see the Internet. When I start RGui it asks me to select a CRAN mirror. This always fails, of course. RGui does not ask for a connection to the Internet by default, so some installation must have mucked

Re: [R] Multiple imputations : wicked dataset. Need advice for follow-up to a possible solution.

2009-04-28 Thread Gerard M. Keogh
Emmanuel, Friedman's (Annals of Stats 1991) MARS program implements recursive partitioning in a regression context - a version of it written by Trevor Hastie was available in R but I don't know what package it's now in - I only have base stuff available (long story). MARS, like recursive

Re: [R] Finding rows common to two datasets

2009-04-28 Thread Steve Murray
Thanks for the reply, however, when I do the following command, I receive the message: 'data frame with 0 columns and 0 rows'. I've checked again though, and there should be several thousand rows where the Latitude and Longitude pairs are the same. common - intersect(data_frame_x[c(Latitude,

[R] Out of memory issue

2009-04-28 Thread Neotropical bat risk assessments
Hi again all, I can read all of the data is in CSV format with a header row and with 1,200,240 rows. I can do all the plots and ggplot2 has no problems. Seems to be a problem with the MASS package??? It seems that the contour plots are the problem with the memory error.

Re: [R] creating a vector of sums

2009-04-28 Thread Andrew Dolman
Look at ?cumsum andydol...@gmail.com 2009/4/28 Rachel Taylor rachel...@hotmail.com Hi, I am trying to create a function for a goodness-of-fit test for the Pareto Distribution for some loss data that I have. So far I have the following: function(X=OTOL) { n - length(X)-1 #calculated

[R] Bounded memory ANOVA

2009-04-28 Thread Hardi
Hi, I'm using aov() to analyze the data and get the rank of factors. However, this does not work for larger set of data due to memory limitation. Are there any similar function to use aov() on data sets larger than memory similar to biglm ? Thanks, ~ Hardi

Re: [R] downloading r 2.9.0

2009-04-28 Thread Paul Hiemstra
christophe dutang wrote: Hi all, I try to download R 2.9.0 from French mirrors... but the download stops mysteriously at 13.2 MB of the 65MB file. I get this both on my mac and my PC... does anyone face this problem? Christophe Try a different mirror and see what that does Paul --

Re: [R] creating a vector of sums

2009-04-28 Thread jim holtman
?cumsum On Tue, Apr 28, 2009 at 5:30 AM, Rachel Taylor rachel...@hotmail.com wrote: Hi, I am trying to create a function for a goodness-of-fit test for the Pareto Distribution for some loss data that I have. So far I have the following: function(X=OTOL) { n - length(X)-1 #calculated

Re: [R] Finding rows common to two datasets

2009-04-28 Thread jim holtman
You are missing a comma: common - intersect(data_frame_x[,c(Latitude, Longitude)], data_frame_y[,c(Latitude,Longitude)]) On Tue, Apr 28, 2009 at 5:49 AM, Steve Murray smurray...@hotmail.com wrote: Thanks for the reply, however, when I do the following command, I receive the message: 'data

[R] Fwd: kernlab - custom kernel

2009-04-28 Thread Vivek Dikshit
-- Forwarded message -- From: Vivek Dikshit vivek.s...@gmail.com Date: Tue, Apr 28, 2009 at 1:20 PM Subject: kernlab - custom kernel To: r-help@r-project.org hi, I am using R's kernlab package, exactly i am doing classification using ksvm(.) and predict.ksvm(.).I want use of

Re: [R] Build Windows binary

2009-04-28 Thread Duncan Murdoch
On 27/04/2009 8:35 PM, Matthew Fero wrote: Hi everyone, I'm trying to use the online resource, http://win-builder.r- project.org/ in order to build an R package for colleagues on Windows machines (I'm on Mac OS X). I'm not getting an email response from the server (even in my junk mail

[R] Mathematical label in a plot with a percent sign

2009-04-28 Thread Daniel Brewer
Hi, I am trying to produce a plot with an xlabel that reads (x = 5%) with the = turned into the correct epression. I can do this up to the percentage sign by specifiing xlab=expression(x=5). Whatever I do to include the % sign as well doesn't seem to work. xlab=bquote(x=5.(%)) almost works but

Re: [R] Mathematical label in a plot with a percent sign

2009-04-28 Thread Gabor Grothendieck
Try: plot(0, main = ~ x = 5 * %) On Tue, Apr 28, 2009 at 6:37 AM, Daniel Brewer daniel.bre...@icr.ac.uk wrote: Hi, I am trying to produce a plot with an xlabel that reads (x = 5%) with the = turned into the correct epression.  I can do this up to the percentage sign by specifiing

Re: [R] Build Windows binary

2009-04-28 Thread Duncan Murdoch
On 27/04/2009 8:35 PM, Matthew Fero wrote: Hi everyone, I'm trying to use the online resource, http://win-builder.r- project.org/ in order to build an R package for colleagues on Windows machines (I'm on Mac OS X). I'm not getting an email response from the server (even in my junk mail

Re: [R] Build Windows binary

2009-04-28 Thread Uwe Ligges
Duncan Murdoch wrote: On 27/04/2009 8:35 PM, Matthew Fero wrote: Hi everyone, I'm trying to use the online resource, http://win-builder.r- project.org/ in order to build an R package for colleagues on Windows machines (I'm on Mac OS X). I'm not getting an email response from the server

Re: [R] creating a vector of sums

2009-04-28 Thread Alain Guillet
Look at cumsum() Alain Rachel Taylor wrote: Hi, I am trying to create a function for a goodness-of-fit test for the Pareto Distribution for some loss data that I have. So far I have the following: function(X=OTOL) { n - length(X)-1 #calculated the number of values (extra as 0 included) i

[R] text in graph with expression

2009-04-28 Thread Benoit Boulinguiez
Hi all, I'm using 'expression' in the axes labels in graphs to get the greek letters (ylab), as follows: plot( layer_1$U0 ,layer_1$dP/(H1.Theo) #,ylim=c(0,100) ,xlim=c(0,1.1) #,main=Pressure Drop, ,xlab=expression(U[0]~(Nm/s)) ,ylab=expression(Delta~P~(Pa/m)) ,col=2 ,pch=16 ,cex=1.5)

Re: [R] Mathematical label in a plot with a percent sign

2009-04-28 Thread Daniel Brewer
That worked great. Many thanks. Dan Gabor Grothendieck wrote: Try: plot(0, main = ~ x = 5 * %) On Tue, Apr 28, 2009 at 6:37 AM, Daniel Brewer daniel.bre...@icr.ac.uk wrote: Hi, I am trying to produce a plot with an xlabel that reads (x = 5%) with the = turned into the correct

[R] creating a vector of sums

2009-04-28 Thread Rachel Taylor
Hi, I am trying to create a function for a goodness-of-fit test for the Pareto Distribution for some loss data that I have. So far I have the following: function(X=OTOL) { n - length(X)-1 #calculated the number of values (extra as 0 included) i - 2:640 #values of i j - 1:639 #values of i-1 Y

Re: [R] Finding rows common to two datasets

2009-04-28 Thread Umesh Srinivasan
Dear Steve, Can you show us a small sample of your two data frames (maybe the top twenty or so rows)? Maybe things will become clearer then. I don't think 'unique' will help you very much with this. What you can do alternatively (though less elegantly!) do is use a 'for' loop. This would probably

Re: [R] downloading r 2.9.0

2009-04-28 Thread christophe dutang
with the Austrian, it works fine... I should have think before sending an email to r help.. Thanks 2009/4/28 Paul Hiemstra p.hiems...@geo.uu.nl christophe dutang wrote: Hi all, I try to download R 2.9.0 from French mirrors... but the download stops mysteriously at 13.2 MB of the 65MB

[R] Why there is no p-value from likelihood ratio test using anova in GAM model fitting?

2009-04-28 Thread willow1980
Hello, everybody, There is the first time for me to post a question, because I really cannot find answer from books, websites or my colleagues. Thank you in advance for your help! I am running likelihood ratio test to find if the simpler model is not significant from more complicated model.

[R] Random Sample with Unique function

2009-04-28 Thread Krystyna Golabek
Dear R-users I have a dataset of 243 lines with replicate information for 20 different individuals (ID). I would like to randomly sample this dataset 100 times with a selection of unique IDs in each sample. First to create a random sample I have; cc-read.table(blah.blah.blah) names(cc) [1]

Re: [R] text in graph with expression

2009-04-28 Thread Uwe Ligges
Benoit Boulinguiez wrote: Hi all, I'm using 'expression' in the axes labels in graphs to get the greek letters (ylab), as follows: plot( layer_1$U0 ,layer_1$dP/(H1.Theo) #,ylim=c(0,100) ,xlim=c(0,1.1) #,main=Pressure Drop, ,xlab=expression(U[0]~(Nm/s))

Re: [R] I can't install dprep

2009-04-28 Thread Uwe Ligges
Grześ wrote: When I want to install dprep and I always get information: install.packages(dprep) Warning in install.packages(dprep) : argument 'lib' is missing: using 'C:\Users\Documents/R/win-library/2.8' --- Please select a CRAN mirror for use in this session --- Warning message: package

[R] Cannot update.packages (error message)

2009-04-28 Thread Richardson, Patrick
When trying to update (various) packages using update.packages() I get the following error message for various packages package 'fBasics' successfully unpacked and MD5 sums checked Error in unpackPkg(foundpkgs[okp, 2L], foundpkgs[okp, 1L], lib) : malformed bundle DESCRIPTION file, no Contains

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread Gabor Grothendieck
You are trying to create an illegal object, i.e. a data.frame with duplicate row names so its correctly signally the error. Read the definition of data.frame in ?data.frame On Tue, Apr 28, 2009 at 8:04 AM, amor Gandhi amorigan...@yahoo.de wrote: Hi everyone, I have got the following problem:

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread Uwe Ligges
amor Gandhi wrote: Hi everyone, Â I have got the following problem: Â x1 - rnorm(10,5,1) x2 - runif(10,0,1) nam1 - paste(A,1:4,sep=.) nam2 - paste(A,6:9,sep=.) nam - c(nam1,A.4,nam2,A.9) mydata - data.frame(x1,x2) rownames(mydata) - nam Error in `row.names-.data.frame`(`*tmp*`, value =

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread S Ellison
You have used A.4 and A.9 twice. Look at nam # or duplicated(nam) amor Gandhi amorigan...@yahoo.de 28/04/2009 13:04:03 Hi everyone, *á I have got the following problem: *á x1 - rnorm(10,5,1) x2 - runif(10,0,1) nam1 - paste(A,1:4,sep=.) nam2 - paste(A,6:9,sep=.) nam - c(nam1,A.4,nam2,A.9)

Re: [R] memory.limit

2009-04-28 Thread Uwe Ligges
Derek Stephen Elmerick wrote: Hello -- So, independently of any other code, the memory limit error I referenced is not a problem. The issue I am running into now is that our analytics group must go back to all existing code and comment out the memory limit reference [See my example below].

[R] duplicate 'row.names' are not allowed

2009-04-28 Thread amor Gandhi
Hi everyone,   I have got the following problem:   x1 - rnorm(10,5,1) x2 - runif(10,0,1) nam1 - paste(A,1:4,sep=.) nam2 - paste(A,6:9,sep=.) nam - c(nam1,A.4,nam2,A.9) mydata - data.frame(x1,x2) rownames(mydata) - nam Error in `row.names-.data.frame`(`*tmp*`, value = c(A.1, A.2, A.3, :

Re: [R] help on bwplot function

2009-04-28 Thread Dieter Menne
He, Yulei he at hcp.med.harvard.edu writes: I am using R function bwplot to plot box plots. I would like to change some parameters of the typical box plots. For example, I would like to try different types of whisker lines. I can use whiskerline=x in boxplot function but not in bwplot

[R] R 2.9 and XML

2009-04-28 Thread Luis Orlindo Tedeschi
After I installed R 2.9.0 my XML package cannot load; I get an error This application has failed to start because iconv.dll was not found. Re-installing the application may fix this problem. I already re-installed both but the problem persists. Does anyone know what is going on? I would appreciate

Re: [R] A way to get the R data stored temporarily in working memory?

2009-04-28 Thread Kenn Konstabel
What ESC does is stopping current computation -- no idea how to do it in ESS, but there's been a similar question in another list: http://www.archivum.info/gnu.emacs.help/2005-10/msg00509.html KK On Mon, Apr 27, 2009 at 9:11 PM, Friedericksen golu...@gmx.de wrote: Hey, that is very cool!

Re: [R] How to get rid of loop?

2009-04-28 Thread bartjoosen
Hi, how about this: x - runif(100) n - length( x ) y2 - rep(0,n) y2[x 0.75] - 1 y2[x 0.25] - -1 cx - cumsum(abs(y2) ) m - match(cx, cx) y2[y2==0] - 2 y2[x0.5 y2[m]==1] - 0 y2[x0.5 y2[m]==-1] - 0 y3 - y2 y3[y3==0] - 1 y3[y3==2] - 0 cx - cumsum(abs(y3)) m - match(cx, cx) y2 - y2[m] Best

Re: [R] FW: Install of R 2.9.0

2009-04-28 Thread Uwe Ligges
Lyman, Mark wrote: I have just received some additional information. After the No space left on device, there are many file not found error messages. Also, the first time or two our admin ran the install process R would not start. Now R can start up despite all of the error messages. Can these

Re: [R] problem dowloading

2009-04-28 Thread Uwe Ligges
Thanks for the report. There have been some problems with the WIndows binary package building process that have been fixed since yesterday. Everything except FactoMineR works again (I hope), a corrected version of the FactoMineR binary will appear on CRAN master within a few hours. That one

Re: [R] Change font type PNG device with Lattice xyplot

2009-04-28 Thread Dieter Menne
RBlonk robbert.blonk at gmail.com writes: I have some problems with changing the default font (Arial) in a xyplot which is printed using the PNG-device. Although some things have been mentioned about this in the forum, I still couldn't figure it out. Can someone help me out?n Thanks in

[R] truehist and density plots

2009-04-28 Thread carol white
Hi, I wanted to plot the histogram of a vector and then, plot the density function of subsets of the vector on the histogram. So I use truehist in MASS package and lines(density) as follows: length(b) = 1000 truehist(b) lines(density(b[1:100])) however the density plot of the first 100 points

Re: [R] Random Sample with Unique function

2009-04-28 Thread Uwe Ligges
In order to use stratified sampling, either try to implement it yourself or use the sampling package and its function strata() as in: s1 - strata(cc, stratanames=ID, size=rep(1, 20), method=srswr) then you will get 1 observation for each ID. Note that it is not important to use with

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread amor Gandhi
Thank you for your reply :)! Is it possible to solve the problem by using A.4, A.4a, A.9 and A.91? How one cand do this in R?   Many thanks --- S Ellison s.elli...@lgc.co.uk schrieb am Di, 28.4.2009: Von: S Ellison s.elli...@lgc.co.uk Betreff: Re: [R] duplicate 'row.names' are not allowed An:

Re: [R] R 2.9 and XML

2009-04-28 Thread Uwe Ligges
Luis Orlindo Tedeschi wrote: After I installed R 2.9.0 my XML package cannot load; I get an error This application has failed to start because iconv.dll was not found. Re-installing the application may fix this problem. I already re-installed both but the problem persists. Does anyone know

Re: [R] truehist and density plots

2009-04-28 Thread Uwe Ligges
carol white wrote: Hi, I wanted to plot the histogram of a vector and then, plot the density function of subsets of the vector on the histogram. So I use truehist in MASS package and lines(density) as follows: length(b) = 1000 truehist(b) lines(density(b[1:100])) I do not undertsand what

Re: [R] Processing POST data with brew?

2009-04-28 Thread Uwe Ligges
Martijn Ras wrote: Heya Folks, I've got to process a form that contains variable series of values, which i want to collect into a vectors. Say the first series has ten values, with id's ranging from X1 to X10, currently i process them in the following hardcoded manner: x1 -

Re: [R] question about adaboost.

2009-04-28 Thread Uwe Ligges
Cecilia Lezama wrote: Hello, I would like to know how to obtain the misclassification error when performing a boosting analisis with ADABAG package? With: prop.table(Tesis.boostcv$confusion) I obtain the confusion matrix, but not the overall missclassification error. Well, the

Re: [R] Out of memory issue

2009-04-28 Thread Uwe Ligges
Neotropical bat risk assessments wrote: Hi again all, I can read all of the data is in CSV format with a header row and with 1,200,240 rows. I can do all the plots and ggplot2 has no problems. Seems to be a problem with the MASS package??? It seems that the contour plots are

Re: [R] help with random forest package

2009-04-28 Thread Chrysanthi A.
Many thanks for your help. Sorry for my delayed reply, but I was away. Regarding the OOB error, sorry it was a typo. As far as the voting, I was just wondering if there is a function that will give me the prediction of each case through each tree. Is there any function that produce the rules for

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread Uwe Ligges
amor Gandhi wrote: Thank you for your reply :)! Is it possible to solve the problem by using A.4, A.4a, A.9 and A.91? How one cand do this in R? Err, change A.4 to A.4a in your code? Uwe Many thanks --- S Ellison s.elli...@lgc.co.uk schrieb am Di, 28.4.2009: Von: S Ellison

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 28.04.2009 14:33:44: Thank you for your reply :)! Is it possible to solve the problem by using A.4, A.4a, A.9 and A.91? How one cand do this in R? Yes but why? If you want to have some names A.whatever which can repeat itself then does not use it

Re: [R] problem with Power function on a power my result is inf

2009-04-28 Thread Uwe Ligges
Alessandro wrote: Dear user, I have a problem with a power because after a value the result is inf Mydata - data.frame(plot=c(11,12,13,14,15, 16, 21, 22, 23, 24, 25, 26, 31, 32,33, 34), SumH=c(17573.029,22572.162,19659.984,13952.781,6996.924,16049.598,13869.409,

Re: [R] Random Sample with Unique function

2009-04-28 Thread Uwe Ligges
You need to wrap it accordingly: s1 - cc[strata(cc, stratanames=ID, size=rep(1, 20), method=srswr)$ID_unit, ] Uwe Krystyna Golabek wrote: Thanks Uwe, Your strata suggestion works, thank you, but it has created a dataset of random rows but without the data, other columns involved. You

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread amor Gandhi
Yes, I would like, but what I sent you was just an example! I am reading a huge data, so I cant do it by hand, could you please tell how to do this in R, some of the names are also coming one after another.   Many thanks --- Uwe Ligges lig...@statistik.tu-dortmund.de schrieb am Di, 28.4.2009:

Re: [R] re fit with binomial model (lme4)

2009-04-28 Thread Ben Bolker
I think the following works, but use with caution -- I just wrote it last night. setMethod(refit, signature(object = mer, newresp = matrix), function(object, newresp, ...) { ## newresp - as.double(newresp[!is.na(newresp)]) wts - rowSums(newresp) newresp

Re: [R] Generalized linear models

2009-04-28 Thread David Winsemius
I do not answer questions offlist. On Apr 28, 2009, at 2:56 AM, mathallan wrote: Thanks for the answer David Sum er the sum insured the maximal loss of the company. Claims, is the actually claim size. Group is wich type of business is insured. Can you help me to solve the problem? It

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread Uwe Ligges
amor Gandhi wrote: Yes, I would like, but what I sent you was just an example! I am reading a huge data, so I cant do it by hand, could you please tell how to do this in R, some of the names are also coming one after another. But I do not understand why you would habe it as row.names and

Re: [R] update.packages(checkBuilt=TRUE) returns Error: invalid version specification NA in 2.9.0

2009-04-28 Thread Uwe Ligges
peter_kel...@fws.gov wrote: Just tried a minute ago with the Austria mirror as you said, and I still get the error. Can you please tell us the result of traceback() after you did that. Are you sure you have no *old* base packages in the library you want to run update.packages() on? Are

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread amor Gandhi
Thanks, I can't use the name as a variable because I need to create a matrix which does include only numerical values! --- Uwe Ligges lig...@statistik.tu-dortmund.de schrieb am Di, 28.4.2009: Von: Uwe Ligges lig...@statistik.tu-dortmund.de Betreff: Re: [R] duplicate 'row.names' are not allowed

Re: [R] truehist and density plots

2009-04-28 Thread carol white
Consider a vector of 100 elements (attached files). then, truehist(b) lines(density(b[20:50])) How is it possible to have density plots of all subsets like b[20:50] within histogram (without exceeding the max of historgram on y axis)? Is it more clear? Best, --- On Tue, 4/28/09, Uwe Ligges

[R] Dropping 'empty' panels from lattice

2009-04-28 Thread amvds
I have 8 cofactors possibly affecting one and only one variable. I make conditional histograms: -pdf(file=tst3.pdf,paper=special,width=36,height=36) -histogram(~Oversized|dat$c1*dat$c2*dat$c5*dat$c6*dat$c7*dat$c8*dat$c9*dat$c10,nint=21,layout=c(32,8),data=dat,type=count) -dev.off() This works

Re: [R] help with random forest package

2009-04-28 Thread Liaw, Andy
Let's try an example: R iris.1tree - randomForest(Species ~ ., data=iris, ntree=1) R getTree(iris.1tree, 1) left daughter right daughter split var split point status prediction 1 2 3 40.80 1 0 2 0 0 0

Re: [R] effects package --- add abline to plot

2009-04-28 Thread John Fox
Dear Paul, I can't think of a way to do what you want using the plot() methods provided by the package. (You don't say what kind of model you're fitting, but this is true for all of the plot() methods.) On the other hand, as described in ?effect, the object returned by effect() contains all of

Re: [R] help working with date values

2009-04-28 Thread Uwe Ligges
steve_fried...@nps.gov wrote: My data contains a variable observation_date and it contains values as: 1985-09-02 1985-09-15 1985-07-31 1985-09-02 I need to process data annually rather than daily, therefore I'm trying to 1) either extract the first 4 digits from this field and use them as

Re: [R] truehist and density plots

2009-04-28 Thread Uwe Ligges
carol white wrote: Consider a vector of 100 elements (attached files). then, truehist(b) lines(density(b[20:50])) How is it possible to have density plots of all subsets like b[20:50] within histogram (without exceeding the max of historgram on y axis)? Is it more clear? Yes, example:

Re: [R] truehist and density plots

2009-04-28 Thread Uwe Ligges
carol white wrote: OK but how to generalize so that the max of y would cover for all subsets of b? because 50:70 was just an example, so consider other subsets (known or unknow in advance) whose density will be plotted on the histogram. Take all subsets at first and calculate the max of

[R] correlation coefficient

2009-04-28 Thread Benedikt Niesterok
Hello, I would like to get a correlation coefficient (R-squared) for my model. I don't know how to calculate it in R. What I've done so far: x-8.5:32.5 #Vektor x y-c(NA ,5.88 , 6.95 , 7.2 , 7.66 , 8.02 , 8.44 , 9.06, 9.65, 10.22 , 10.63 ,11.06, 11.37, 11.91 ,12.28, 12.69 ,13.07 , 13.5 , 13.3

Re: [R] Why there is no p-value from likelihood ratio test using anova in GAM model fitting?

2009-04-28 Thread Dieter Menne
willow1980 jianghua.liu at shef.ac.uk writes: However, when I run LRT to compare them, the test did not return F value and p-value for me. What's the reason? Analysis of Deviance Table Model 1: sum_surv15 ~ s(FLBS) + s(byear) + s(FLBS,

[R] help working with date values

2009-04-28 Thread Steve_Friedman
My data contains a variable observation_date and it contains values as: 1985-09-02 1985-09-15 1985-07-31 1985-09-02 I need to process data annually rather than daily, therefore I'm trying to 1) either extract the first 4 digits from this field and use them as a new variable year or 2) keep

Re: [R] Why there is no p-value from likelihood ratio test using anova in GAM model fitting?

2009-04-28 Thread Simon Wood
The simpler model has the lower deviance (marginally), so there is nothing to test here. This can happen with maximum penalized likelihood estimators, even though the models are nested (especially if the smoothing parameters are selected automatically). Are you using gam:gam or mgcv:gam (and

Re: [R] help working with date values

2009-04-28 Thread Gabor Grothendieck
Here are a few ways: xx - c(1985-09-02, 1985-09-16, 1985-07-31, 1985-07-31, 1985-09-02, 1985-08-26, 1985-07-31, 1985-08-26, 1985-09-02, 1985-09-16) # 1 library(zoo) as.numeric(floor(as.yearmon(xx))) [1] 1985 1985 1985 1985 1985 1985 1985 1985 1985 1985 #2 as.numeric(substr(xx, 1, 4))

[R] R-2.9.0 malformed bundle DESCRIPTION file, no Contains field

2009-04-28 Thread Richardson, Patrick
When trying to update (various) packages using update.packages() I get the following error message for various packages package 'fBasics' successfully unpacked and MD5 sums checked Error in unpackPkg(foundpkgs[okp, 2L], foundpkgs[okp, 1L], lib) : malformed bundle DESCRIPTION file, no

Re: [R] truehist and density plots

2009-04-28 Thread carol white
OK but how to generalize so that the max of y would cover for all subsets of b? because 50:70 was just an example, so consider other subsets (known or unknow in advance) whose density will be plotted on the histogram. But since b is the full set, why it doesn't contain the max of y for all

Re: [R] truehist and density plots

2009-04-28 Thread Cuvelier Etienne
Perhaps like this : temp =density(b[20:50]) truehist(b, ymax=max(temp$y)) lines(temp) Etienne carol white a écrit : Consider a vector of 100 elements (attached files). then, truehist(b) lines(density(b[20:50])) How is it possible to have density plots of all subsets like b[20:50] within

Re: [R] truehist and density plots

2009-04-28 Thread Peter Flom
carol white wht_...@yahoo.com wrote Consider a vector of 100 elements (attached files). then, truehist(b) lines(density(b[20:50])) How is it possible to have density plots of all subsets like b[20:50] within histogram (without exceeding the max of historgram on y axis)? I didn't open your

Re: [R] rounding problem

2009-04-28 Thread Uwe Ligges
Emmanuel Charpentier wrote: Seconded ! Errr, this is in the sources for ages now ... Uwe Ligges Emmanuel Charpentier Le lundi 02 mars 2009 à 21:06 -0700, Greg Snow a écrit : -Original Message- From: r-help-boun...@r-project.org

Re: [R] Dropping 'empty' panels from lattice

2009-04-28 Thread Dieter Menne
amvds at xs4all.nl writes: I have 8 cofactors possibly affecting one and only one variable. I make conditional histograms: -pdf(file=tst3.pdf,paper=special,width=36,height=36) -histogram(~Oversized|dat$c1*dat$c2*dat$c5*dat$c6*dat$c7*dat$c8*

Re: [R] truehist and density plots

2009-04-28 Thread carol white
Is there any other way to illustrate the overlap of subsets' distribution (not necessarily by an estimation plot but by a plot of true values)? --- On Tue, 4/28/09, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: From: Uwe Ligges lig...@statistik.tu-dortmund.de Subject: Re: [R] truehist and

<    1   2