Re: [R] tcltk question

2007-10-03 Thread Peter Dalgaard
Tae-Hoon Chung wrote: > Is there any requirement for TclTk support for R? When I tried to > call the tcltk library, it failed with the following message: > > > library(tcltk) > Error in firstlib(which.lib.loc, package) : > Tcl/Tk support is not available on this system > Error in librar

Re: [R] as.numeric(FALSE) fails after loading the Matrix package

2007-10-03 Thread Prof Brian Ripley
On Thu, 4 Oct 2007, Bernd Weiss wrote: > Dear all, > > is this a bug? Did you install package Matrix under that exact version of R? This is the symptom of using a version of Matrix installed under R 2.5.x in R 2.6.0. It works correctly with the CRAN Windows versions of R 2.6.0 and Matrix. Try

Re: [R] Windows OS, R and unicode

2007-10-03 Thread Prof Brian Ripley
Richard, At present the \u notation only works on Windows in CJK locales, and only to represent characters defined in the locale in use. Now it seems that _does_ include the signs you mention in Japanese. So it is possible that if you start R with Rgui LC_CTYPE=ja then this will work: i

Re: [R] r-package RDCOMClient

2007-10-03 Thread Marcin Kopaczynski
the windows version on both machines is the same, namely Microsoft Windows XP Professional Version 2002 Service Pack 2 the r-version is also the same: 2.5.1 RDCOMClient-version on both machines is 0.91-0 rcom-version on both machines is 1.5-2.2 what is different, for both machines is that they a

[R] Missing value analysis in time series

2007-10-03 Thread Megh Dal
Hi all R user, Suppose I have daily time series value for two assets. However for some days value of 1 asset is missing whereas for some of the other days values of other asset are missing. Can anyone tell me what would be effective way by using statistical analysis to fill up those gaps b

Re: [R] FW: help with mclust

2007-10-03 Thread Tatiana Benaglia
Hi Ken, I know your question was specifically about the mclus, but you can also try to fit a univariate gaussian mixture using the normalmixEM in the mixtools package. library(mixtools) out = normalmixEM(data, k=3) That's what I got for your sample: > out$lambda [1] 0.119 0.647 0.234 > out

Re: [R] as.numeric(FALSE) fails after loading the Matrix package

2007-10-03 Thread Bernd Weiss
Bernd Weiss schrieb: > Dear all, > > is this a bug? > > >> as.numeric(FALSE) > [1] 0 >> library(Matrix) > Loading required package: lattice >> as.numeric(FALSE) > Error in UseMethod("as.double") : no applicable method for "as.double" > After doing a complette reinstallation (uninstalling R, de

[R] tcltk question

2007-10-03 Thread Tae-Hoon Chung
Is there any requirement for TclTk support for R? When I tried to call the tcltk library, it failed with the following message: > library(tcltk) Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for 't

[R] as.numeric(FALSE) fails after loading the Matrix package

2007-10-03 Thread Bernd Weiss
Dear all, is this a bug? > as.numeric(FALSE) [1] 0 > library(Matrix) Loading required package: lattice > as.numeric(FALSE) Error in UseMethod("as.double") : no applicable method for "as.double" > Regards, Bernd > version _ platform i386-pc-mingw32 arch i386 o

[R] linewidth in Rgraphviz

2007-10-03 Thread Ben Bolker
I'm an Rgraphviz newbie trying to figure out how to do some things/whether they are possible. Apparently graphviz does allow you to modify line widths of edges: see https://mailman.research.att.com/pipermail/graphviz-interest/2001q2/51.html (although it looks a little obscure even in gr

Re: [R] Odp: Error in lm.fit(

2007-10-03 Thread Peter Lauren
Hi, I checked my code and found that it was actually a subsequent call to lm.fit() (which only gets called occasionally) where the problem occurred. I found that I was accidentally passing a matrix called PMs instead of the vector PM. Sorry about that. Thanks, Peter. --- Petr PIKAL <[EMAIL PR

[R] ??clusplot

2007-10-03 Thread Haiyong Xu
Hi there, I want to do classify some 2-dimensional points into four clusters by pam() in the cluster package. However, I encountered some problems. 1. How can I change the "xlab" and "ylab" instead of the default "Component 1" and "Component 2"? When I put "xlab" option in the function, it

[R] Windows OS, R and unicode

2007-10-03 Thread Richard Rowe
I'm trying to use the biological female and male signs in R2.5.1 under Windows XP. I can access and insert these symbols using word-processors. In general these should be available as \u2640 and \u2642 but I can't make them happen in R using (say) text(5,5, "\u2640") message "invalid \u seq

Re: [R] ggplot2: problem with geom_errorbar and geom_abline

2007-10-03 Thread Ben Bolker
James D Forester wrote: > > Hi all, > > I have run into what appears to be a bug in ggplot2; however, I am new > to the ggplot syntax, so I might be missing a key element. The main > issue is that I cannot get geom_abline to plot when colour is used to > identify "group" in the main plot.

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
Incidentally, the feature becomes really powerful when one uses functions such as addmargins together with prop.table as in coinf.table <-as.matrix(coinfection) prop.table(coinf.table,1) # to see proportions from each HPV type per study addmargins(coinf.table)# to see totals within study and accr

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
Genius! Thank you very much. Yes indeed I should have thought of that. For some reason I have a mental blank about the use of row.names and instead I repeatedly put that kind of data as a column in the data frame. Thank you for the rescue. __ R-help@r-pr

[R] FW: help with mclust

2007-10-03 Thread Lo, Ken
> No HTML this time. Sorry Dear all, I am attempting to model some one-dimensional data using Gaussian mixture model with mclust.  Generally, the data that I have have 3 overlapping populations (with one of them being the majority, and the other two combining to less than 15%) and for some re

Re: [R] Forcing zero intercept in two predictor case - stat question not R question

2007-10-03 Thread Rolf Turner
On 4/10/2007, at 9:48 AM, Leeds, Mark (IED) wrote: > When one is doing simple regression and needs to force a zero > intercept > ( for whatever reason. I realize it's a controversial issue ), > then subtracting the means of the left hand side and the right hand > side > from themselves does t

[R] Trouble with znorm

2007-10-03 Thread Harshal D Dedhia
I am trying to normalize a dataframe of dimensions(1,1) using znorm from the dprep package. What I get back is the same data, and nothing has been normalized. Wondering if there is a known bug I am running into or am I missing something? Cheers! Harshal [[alternative HTML version del

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Deepayan Sarkar
On 10/3/07, Farrel Buchinsky <[EMAIL PROTECTED]> wrote: > Thank you. It comes close but not exactly what I wanted. I had to > scrap my column that contained character values. That column noted the > name of the study. Let me try show you here > > Best if viewed in courier font > > > coinfection >

Re: [R] Nomogram

2007-10-03 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: > Hi R users. > > I have a model of cox that already it is estimated (I have only the > model estimated, I haven't data), how can I determine a nomogram with > R? Is it posible to do nomograms in Design package? I think that's > only when the model (Cox Regression i

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
No. Not really.What you have done seems to be similar to what I could do with the reshape library. rawer<-melt(coinfection,id.var="study") # please refer to my post immediately before this. I am still unable to make use of prop.table and margin.table functions. On 10/3/07, Deepayan Sarkar <[EMAIL

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
Thank you. It comes close but not exactly what I wanted. I had to scrap my column that contained character values. That column noted the name of the study. Let me try show you here Best if viewed in courier font > coinfection study HPV6 HPV11 CoInfect other 1 Wiatrak 2004 3123

Re: [R] Forcing zero intercept in two predictor case - stat questionnot R question

2007-10-03 Thread Leeds, Mark \(IED\)
Hi john : I just checked it with a simple example before I saw your email and that does work. Thanks and I apologize to you and the list for the question. -Original Message- From: John Fox [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 03, 2007 6:06 PM To: Leeds, Mark (IED) Cc: [EMAI

Re: [R] Forcing zero intercept in two predictor case - stat questionnot R question

2007-10-03 Thread John Fox
Dear Mark, John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMA

[R] help with mclust

2007-10-03 Thread Lo, Ken
Dear all, I am attempting to model some one-dimensional data using Gaussian mixture model with mclust. Generally, the data that I have have 3 overlapping populations (with one of them being the majority, and the other two combining to less than 15%) and for some reason, mclust consistently ign

Re: [R] table with a weight variable?

2007-10-03 Thread Marc Schwartz
On Wed, 2007-10-03 at 21:31 +, lamack lamack wrote: > Dear all, there is an R function do a frequency table considering a weight > variable? > > M A 23 > M B 34 > F A 23 > F B 45 > > I would like a table like this > > A B > M 23 34 > F 23 45 See ?xtabs For exam

Re: [R] Shading area under density curves

2007-10-03 Thread Marc Schwartz
On Wed, 2007-10-03 at 14:21 -0700, [EMAIL PROTECTED] wrote: > Hello, > > I have a question regarding shading regions under curves to display > 95% confidence intervals. I generated bootstrap results for the slope > and intercept of a simple linear regression model using the following > code

[R] Forcing zero intercept in two predictor case - stat question not R question

2007-10-03 Thread Leeds, Mark \(IED\)
When one is doing simple regression and needs to force a zero intercept ( for whatever reason. I realize it's a controversial issue ), then subtracting the means of the left hand side and the right hand side from themselves does the trick. Does anyone know if there is a similar trick when the RHS

[R] table with a weight variable?

2007-10-03 Thread lamack lamack
Dear all, there is an R function do a frequency table considering a weight variable? M A 23 M B 34 F A 23 F B 45 I would like a table like this A B M 23 34 F 23 45 Best regards _ Conheça o Windows

Re: [R] r-package RDCOMClient

2007-10-03 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marcin Kopaczynski wrote: > both versions work on my pc, but on the pc where i have bloomberg > installed the things i described do not work. Can you give us some details about which versions of R you have, versions of RDCOMClient and rcom and als

[R] Shading area under density curves

2007-10-03 Thread rominger
Hello, I have a question regarding shading regions under curves to display 95% confidence intervals. I generated bootstrap results for the slope and intercept of a simple linear regression model using the following code (borrowed from JJ Faraway 2005): > attach(allposs.nine.d) > x<-model.m

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Deepayan Sarkar
On 10/3/07, Farrel Buchinsky <[EMAIL PROTECTED]> wrote: > Your solution would work if the data frame contained the raw data. In that > case the table function as you outlined would be a table crossing all the > levels of column 1 with all the levels of column 2. > Instead my data frame is the table

Re: [R] Checking for adequate disk space

2007-10-03 Thread Sundar Dorai-Raj
bogdan romocea said the following on 10/3/2007 12:32 PM: > Run df from R; here's an example (run on Interix): > $ df /dev/fs/C/WINDOWS > Filesystem 512-blocks Used Available Capacity Type Mounted on > //HarddiskVolume2 77706400 34632424 4307397645% ntfs /dev/fs/C > >

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Rolf Turner
I think that what you need to do is as.table(as.matrix(dff)) E.g. melvin <- data.frame(x=c(3,1,3,2),y=c(3,3,4,5)) clyde <- as.table(as.matrix(melvin)) prop.table(clyde,1) x y A 0.500 0.500 B 0.250 0.750 C 0.4285714 0.5714286

Re: [R] Reimplement order somehow

2007-10-03 Thread XpeH
I have found how to reimplement order method from R language in PHP: $value) { $array_new[$key + 1] = $value; } $array = $array_new; print "\n --\n"; $uniq_arr = array_unique($array); ksort($uniq_arr); foreach ($array as $key => $value) { if ($key !== ($key +1)) { $array[$

[R] Nomogram

2007-10-03 Thread motaveiga
Hi R users. I have a model of cox that already it is estimated (I have only the model estimated, I haven't data), how can I determine a nomogram with R? Is it posible to do nomograms in Design package? I think that's only when the model (Cox Regression in this case) is before estimated i

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
Your solution would work if the data frame contained the raw data. In that case the table function as you outlined would be a table crossing all the levels of column 1 with all the levels of column 2. Instead my data frame is the table. It is an aggregate table (I may be using the wrong buzzwords h

Re: [R] Factor levels.

2007-10-03 Thread Peter Dalgaard
Peter Dalgaard wrote: > Rolf Turner wrote: > >> P.S. ***Are*** there any risks/dangers in following Christos >> Hatzis' suggestion of simply doing >> >> levels(fff) <- c("U","A","S") ??? >> > Not if the levels are right to begin with. > > Problems only arise if fff s

Re: [R] Factor levels.

2007-10-03 Thread Rolf Turner
On 4/10/2007, at 8:29 AM, Peter Dalgaard wrote: > Rolf Turner wrote: >> P.S. ***Are*** there any risks/dangers in following Christos >> Hatzis' suggestion of simply doing >> >> levels(fff) <- c("U","A","S") ??? > Not if the levels are right to begin with. > > Problems onl

Re: [R] Factor levels.

2007-10-03 Thread Peter Dalgaard
Rolf Turner wrote: > P.S. ***Are*** there any risks/dangers in following Christos > Hatzis' suggestion of simply doing > > levels(fff) <- c("U","A","S") ??? Not if the levels are right to begin with. Problems only arise if fff somehow becomes a two-level factor, e.g. if yo

Re: [R] Factor levels.

2007-10-03 Thread Christos Hatzis
My suggestion was based on the standard sort order of a factor. What I did as an example was to create a factor having your specified levels: > x <- factor(sample(c("Unit","Achievement","Scholarship"), 10, TRUE)) > x [1] Achievement UnitAchievement UnitScholarship Achievement Unit

[R] datasets

2007-10-03 Thread Luís Paulo F. Garcia
Hi, my name is Luis, and I have a problem with a dataset. Its name is algae and count the collection of data in a lake and respective proliferation of algae. The parameters that it has are: "mxPH", "mnO2", "Cl", "NO3" "NH4", "oPO4", "PO4", "Chla" and "a1" all numerics. a1 - algae1 If I try to do S

Re: [R] Factor levels.

2007-10-03 Thread Rolf Turner
On 4/10/2007, at 7:50 AM, Peter Dalgaard wrote: > Rolf Turner wrote: >>> Does it even work? (What if it is the first or the 2nd level that >>> is absent? >> >> Yes it works. What's the problem? >> >> To beat it to death: if the second level of fff is absent >> then fff will consist

Re: [R] Factor levels.

2007-10-03 Thread Peter Dalgaard
Rolf Turner wrote: >> Does it even work? (What if it is the first or the 2nd level that is >> absent? > > Yes it works. What's the problem? > > To beat it to death: if the second level of fff is absent then > fff will consist entirely of 1's and 3's, > and so c("U","A","S")[fff] wil

Re: [R] R routines vs. MATLAB/SPSS Routines

2007-10-03 Thread Rolf Turner
On 3/10/2007, at 8:30 PM, Patrick Burns wrote: > I don't think it is so much that the R routines > work faster/more efficiently/more accurately > but that the user works faster/more efficiently/ > more accurately. Well said, O Wise and Ancient One!!! :-) :-) :-)

[R] Foometrics in R

2007-10-03 Thread Jan de Leeuw
At www.jstatsoft.org we now have three special volumes Volume 22, Ecology and Ecological Modelling in R (Thomas Kneib and Thomas Petzoldt, eds.) Volume 20, Psychometrics in R (Jan de Leeuw and Patrick Mair, eds.) Volume 18, Spectroscopy and Chemometrics in R (Kate Mullen and Ivo van Stokkum,

Re: [R] Factor levels.

2007-10-03 Thread Rolf Turner
On 3/10/2007, at 5:10 PM, Christos Hatzis wrote: > Would > > levels(fff) <- c("A","S","U") > > not work? Well, not quite. This would scramble the levels. The levels of the original fff are c("Unit","Achieved","Scholarship") --- i.e. they are ***not*** in alphabetical order

Re: [R] Checking for adequate disk space

2007-10-03 Thread bogdan romocea
Run df from R; here's an example (run on Interix): $ df /dev/fs/C/WINDOWS Filesystem 512-blocks Used Available Capacity Type Mounted on //HarddiskVolume2 77706400 34632424 4307397645% ntfs /dev/fs/C See man df for details. > -Original Message- > From: [EMAIL

Re: [R] Factor levels.

2007-10-03 Thread Rolf Turner
On 3/10/2007, at 5:48 PM, Peter Dalgaard wrote: > Rolf Turner wrote: >> I have factors with levels ``Unit", "Achieved", and "Scholarship"; >> I wish to replace these with >> "U", "A", and "S". >> >> So I do >> >> fff <- factor(fff,labels=c("U","A","S")) >> >> This works as long as all of

[R] help with stepclass (klaR)

2007-10-03 Thread Silvia Lomascolo
I use Windows, R version 2.5.1 When I try to run stepclass (klaR) I get an error message/warning saying: 1: error(s) in modeling/prediction step in: cv.rate(vars = c(model, tryvar), data = data, grouping = grouping, ... Actually, I look 16 warnings of this type. Can anyone tell me what this

Re: [R] Speeding up simulation of mean nearest neighbor distances

2007-10-03 Thread hadley wickham
It looks like you can pass a vector of neighbourhoods to nndist. nndist(rpp, k=2:10) Although you get some warnings, the answers appear to be the same. all.equal(t(sapply(2:10, function(i) nndist(rpp, k=i))), nndist(rpp, k=2:10)) This might be quite a lot faster, depending on how much work is c

Re: [R] accuracy of pt for x close to 0

2007-10-03 Thread Charles C. Berry
On Wed, 3 Oct 2007, skylab gupta wrote: > Hello, > > I have been playing around with the statistical distributions in R, and > overall I think the accuracy is very good. However, it seems that for the > Student's t distribution, the CDF loses accuracy when evaluated at values > close to zero. For

Re: [R] R 'function' as "subroutine"

2007-10-03 Thread Gabor Grothendieck
On 10/3/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 10/3/2007 7:56 AM, (Ted Harding) wrote: > > Hi Folks, > > > > The question I'm asking, regarding the use of function > > definitions in the context described below, is whether > > there are subtle traps or obscure limitations I should > > w

[R] Checking for adequate disk space

2007-10-03 Thread Sundar Dorai-Raj
Hi, all, (version info at end) I'm running a script which takes input files, does some analysis, and writes the output to csv files. Last night I ran the script (it took ~6.5 hours) thinking all would go well since it ran on a subset of the data without issue. However, when I returned this mor

Re: [R] GARCH simulations

2007-10-03 Thread Giovanni Petris
It shouldn't be hard, using the definition of GARCH(1,1). Giovanni > Date: Tue, 02 Oct 2007 17:14:27 -0400 (EDT) > From: [EMAIL PROTECTED] > Sender: [EMAIL PROTECTED] > Importance: Normal > Precedence: list > User-Agent: SquirrelMail/1.4.6 > > Hey, > > Is there any way to simulate a GARCH(1,1

Re: [R] Speeding up simulation of mean nearest neighbor distances

2007-10-03 Thread jim holtman
If you take a look at what is happening with Rprof, you will see that most of the time (96.6%) is being taken in the 'nndist' function, so if you want to improve your algorithm, can you somehow reduce the number of time you call it, or find a different approach. So it is a function of the algorith

Re: [R] corMatrix crashes R 2.5.1 (windows XP) with corARMA structure

2007-10-03 Thread Uwe Ligges
This is reproducible with R-2.6.0 for me. You might want to report it to R-Core, the maintainer of that package. Uwe Ligges Benjamin Tyner wrote: > R-helpers, > > n <- 100 > arcoefs <- c(0.8) > macoefs <- c(-0.6) > p <- length(arcoefs) > q <- length(macoefs) > require(nlme) > tmp <- corARMA(va

Re: [R] r-package RDCOMClient

2007-10-03 Thread Marcin Kopaczynski
both versions work on my pc, but on the pc where i have bloomberg installed the things i described do not work. the rcom peckage works, but comCreateObject creates an object which is somehow different from what COMCreate creates. especially the Slot "ref": row is not present anymore and so RBl

[R] New package to read and write SAS Transport (XPORT) files

2007-10-03 Thread Gregory R. Warnes
Metrum Institute and Random Technologies LLC are pleased to announce the availability of the SASxport package. The new SASxport package provides the ability to directly read, list, and write SAS 'xport' files, including proper handling of custom SAS formats. (This extends existing functional

Re: [R] building packages on Windows

2007-10-03 Thread Uwe Ligges
Duncan Murdoch wrote: > On 01/10/2007 11:45 PM, Edna Bell wrote: >> Hi again. >> >> I'm sure that this is really simple. >> >> I'm trying to build a package on a Windows Vista machine. I use >> Rcmd build --binary test >> >> but I get the "Please set TMPDIR to a valid temporary directory" >> >>

Re: [R] problem with ARES

2007-10-03 Thread Uwe Ligges
chevolot wrote: > Dear mailing list: > > I am a new user of R and I would like to use the new ARES package. I have > followed the procedure to import a genepopfile and everything seemed to > work. However when I ran aresCalc function, I got a message error and I > don't know what it means. The e

Re: [R] R 'function' as "subroutine"

2007-10-03 Thread Duncan Murdoch
On 10/3/2007 7:56 AM, (Ted Harding) wrote: > Hi Folks, > > The question I'm asking, regarding the use of function > definitions in the context described below, is whether > there are subtle traps or obscure limitations I should > watch out for. It is probably a rather naive question... > > Quite

[R] ggplot2: problem with geom_errorbar and geom_abline

2007-10-03 Thread James D Forester
Hi all, I have run into what appears to be a bug in ggplot2; however, I am new to the ggplot syntax, so I might be missing a key element. The main issue is that I cannot get geom_abline to plot when colour is used to identify "group" in the main plot. When I remove colour, geom_abline works b

Re: [R] error installing gsl pkg

2007-10-03 Thread Dirk Eddelbuettel
On 3 October 2007 at 12:25, Randy Heiland wrote: | Thanks much for the reply. It turns out, for reasons which are still | unknown to me, that on this machine, doing the following: | | % g++ bessel.cpp -o bessel -lgsl -lgslcblas | | will tell me it can't find -lgsl, in spite of its path bein

[R] Speeding up simulation of mean nearest neighbor distances

2007-10-03 Thread Dale Steele
I've written the function below to simulate the mean 1st through nth nearest neighbor distances for a random spatial pattern using the functions nndist() and runifpoint() from spatsat. It works, but runs relatively slowly - would appreciate suggestions on how to speed up this function. Thanks. -

Re: [R] R routines vs. MATLAB/SPSS Routines

2007-10-03 Thread Bert Gunter
On Wed, 3 Oct 2007, Patrick Burns wrote: > I don't think it is so much that the R routines > work faster/more efficiently/more accurately > but that the user works faster/more efficiently/ > more accurately. Might this be a fortunes candidate? (Perhaps a larger excerpt) Bert Gunter Genentech

[R] accuracy of pt for x close to 0

2007-10-03 Thread skylab gupta
Hello, I have been playing around with the statistical distributions in R, and overall I think the accuracy is very good. However, it seems that for the Student's t distribution, the CDF loses accuracy when evaluated at values close to zero. For instance, I did the following in R

Re: [R] Save and load workspace in R: strange error.

2007-10-03 Thread Tony Plate
Sounds like you are having permissions problems. And as you're using a mix of Unix and WinXP, you might be suffering from some strange permissions settings. WinXP allows a very rich set of permissions which for many exotic combinations have no corresponding mapping to the much simpler 9-octet

Re: [R] error installing gsl pkg

2007-10-03 Thread Randy Heiland
Robin, Thanks much for the reply. It turns out, for reasons which are still unknown to me, that on this machine, doing the following: % g++ bessel.cpp -o bessel -lgsl -lgslcblas will tell me it can't find -lgsl, in spite of its path being on my LD_LIBRARY_PATH. So, being explicit solves

Re: [R] Apparently Conflicting Results with coxph

2007-10-03 Thread Terry Therneau
> I thought about this some more, and I'm not sure that possibility is > "to blame." In my time-dependent model, I don't think I'm doing > anything different than is done for transplant in the Stanford > Heart Study (the often used example for this kind of time-dependent > covariate). As in my ca

Re: [R] Save and load workspace in R: strange error.

2007-10-03 Thread Hongxiao Zhu
Tony, Thanks for return. Actually, the data object 'junk4.RData' was created but have size 0. It seems no data was saved. But the real data that I want to load have data in it, which I can't load use my own user account. But if using other people's user account under the same system, it can be

Re: [R] offset in survreg

2007-10-03 Thread Prof Brian Ripley
On Wed, 3 Oct 2007, Ming-Wen An wrote: > Hello, > > I have a question regarding the use of an offset term with survreg(), > in the Survival library. In particular, I am trying to figure out on > what scale the offset term should be. > > Here's a simple example with no censoring and no coefficient

Re: [R] inverse of matrix made by low.tri function

2007-10-03 Thread Prof Brian Ripley
You missed one very important line: > library(Matrix) This is not R, it is package Matrix, and the error is in that package, as traceback() shows: > traceback() 6: sprintf(gettext(fmt, domain = domain), ...) 5: gettextf("not-yet-implemented method for %s(<%s>, <%s>).\n ->> Ask the package aut

Re: [R] Strange names when creating a data.frame: Difference between <- and =

2007-10-03 Thread John Kane
To everyone who answered Many thanks for the explanations. I think I see what is happening now __ 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

[R] inverse of matrix made by low.tri function

2007-10-03 Thread kevinchang
Hi all, I am using R trying to get a inverse matrix of (X^T)X , but I keep getting the error message like: no b argument and no default value for sprintf(gettext(fmt, domain = domain), ...) . # my code

Re: [R] Making a table: collapsing across sub-strings

2007-10-03 Thread jim holtman
How do you determine if one string is a subset of another? Does it only match at the beginning, or anywhere? How large is your set of strings? Can you use table as you describe and then determine what the groupings of subsets are and then just add the numbers together? You can use grep/regexpr t

[R] Making a table: collapsing across sub-strings

2007-10-03 Thread Dieter Vanderelst
Hi list, I'm currently processing textual data and I would really appreciate some help with one off my problems. I have a set of strings and I want to count how often each of this strings appears in this set. This is not very difficult and can be done as: TB<-table(my_set) plot(TB) However, I

Re: [R] Save and load workspace in R: strange error.

2007-10-03 Thread Tony Plate
Did you check whether 'junk4.RData' was created and what its length was - maybe an empty file is being created. Is there some sort of quota or permissions problem? My suggestion would be to look at the size and permissions on the directory and the file. If you need more help, I would suggest

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread John Kane
--- Farrel Buchinsky <[EMAIL PROTECTED]> wrote: > How do you create a table from a data frame? I tried > as.table( > name.of.data.frame) but it bombed out. > I will include the exact error message in my next > posting. If I recall > correctly, it said that the data.frame could not be > coerced to

Re: [R] R 'function' as "subroutine"

2007-10-03 Thread Gabor Grothendieck
On 10/3/07, Ted Harding <[EMAIL PROTECTED]> wrote: > Thanks for the suggestions, Gabor! > > On 03-Oct-07 12:52:51, Gabor Grothendieck wrote: > > 1. you could place the commands in a file and source the file each > > time you want to run it or it might be good enough to place it on the > > clipboar

[R] offset in survreg

2007-10-03 Thread Ming-Wen An
Hello, I have a question regarding the use of an offset term with survreg(), in the Survival library. In particular, I am trying to figure out on what scale the offset term should be. Here's a simple example with no censoring and no coefficients: - y = rlnorm(1000, meanlog = 10, sdlog =

[R] variance explaine by each term in GLS model

2007-10-03 Thread Debbie Russell
Dear all Sorry to bother you. I have a GLS model: modela<-gls(pop2~pop1-1 + ccs + pop1:ccs,data=data2,corr = corSpher(c(5, 0.5 ),form = ~ latitude + longitude, nugget = TRUE), method = "ML") I was wondering how I can work out how much variance is explained by the model AND by each term. Any h

[R] Odp: Error in lm.fit(

2007-10-03 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 03.10.2007 14:56:19: > I am using R.2.4.1 on Windows XP 5.1 (SP 2). Upgrade R. Version 2.6.0 is imminent. > > I have the following line in my R code. > > Analysis=anova(lm(PM ~ x)) > > It works the first 60 or so times it is called but > then I get the followi

Re: [R] Reimplement order somehow

2007-10-03 Thread Vladimir Eremeev
Vladimir Eremeev wrote: > > > XpeH wrote: >> >> I am trying to understand how the order method in R language works, and >> then I'd like to do the same in some other language. >> > > 1. Type order in R command prompt (without "(" and ")") and press enter. > This will print you the body of

Re: [R] R 'function' as "subroutine"

2007-10-03 Thread Ted Harding
Thanks for the suggestions, Gabor! On 03-Oct-07 12:52:51, Gabor Grothendieck wrote: > 1. you could place the commands in a file and source the file each > time you want to run it or it might be good enough to place it on the > clipboard and then just do source("clipboard") Using the file solutio

Re: [R] Reimplement order somehow

2007-10-03 Thread Vladimir Eremeev
XpeH wrote: > > I am trying to understand how the order method in R language works, and > then I'd like to do the same in some other language. > 1. Type order in R command prompt (without "(" and ")") and press enter. This will print you the body of this function, so you can inspect it. You c

Re: [R] How to avoid overfitting in gam(mgcv)

2007-10-03 Thread Ariyo Kanno
Thank you for your advices. I will try even increased "gamma" values, and all-out cross-validations. 2007/10/3, Frank E Harrell Jr <[EMAIL PROTECTED]>: > Ariyo Kanno wrote: > > Sorry, let me fix 1 sentence. > > > > "Here I try to mean by "overfitting" that GCV was significantly SMALLER > > than t

Re: [R] error installing gsl pkg

2007-10-03 Thread Robin Hankin
Hello Randy I get emails like this quite a lot. The most likely problem is in the installation of the gsl library. To verify that it is in fact installed, try to compile and run the little Bessel function example given in gsl-ref, section 2.1. Get this working first. If it works, this means t

Re: [R] mcv package gamm function Error in chol(XVX + S)

2007-10-03 Thread Simon Wood
Dae-Jin, Thanks for your (offline) persistance: you are right the problem is with `gamm'. There was a dimension dropping error in `formXtViX' (called by `gamm') for group sizes of 1 (as occurs when you have a random effect per observation). This will be fixed in mgcv_1.3-28. best, Simon On T

Re: [R] How to avoid overfitting in gam(mgcv)

2007-10-03 Thread Frank E Harrell Jr
Ariyo Kanno wrote: > Sorry, let me fix 1 sentence. > > "Here I try to mean by "overfitting" that GCV was significantly SMALLER > than the mean square error of prediction of the validation data, which > was randomly selected and not used for regression." > >> Thank you for valuable advices. If yo

[R] error installing gsl pkg

2007-10-03 Thread Randy Heiland
Newbie here (to R) and running Linux... > install.packages("gsl","~/R") ... trying URL 'http://cran.wustl.edu/src/contrib/gsl_1.8-4.tar.gz' Content type 'application/x-tar' length 57051 bytes opened URL == downloaded 55Kb * Installing *source* pack

Re: [R] How to avoid overfitting in gam(mgcv)

2007-10-03 Thread Simon Wood
> > "Here I try to mean by "overfitting" that GCV was significantly SMALLER > than the mean square error of prediction of the validation data, which > was randomly selected and not used for regression." --- so you could try increasing gamma until this is no longer the case. -- > Simon Wood, Ma

Re: [R] How to avoid overfitting in gam(mgcv)

2007-10-03 Thread Ariyo Kanno
Sorry, let me fix 1 sentence. "Here I try to mean by "overfitting" that GCV was significantly SMALLER than the mean square error of prediction of the validation data, which was randomly selected and not used for regression." > Thank you for valuable advices. > I'm sorry Dr. N. Wood that by mistak

Re: [R] Reimplement order somehow

2007-10-03 Thread XpeH
Hello, Thierry Thank you for the fast reply actually my php script is not correct, the correct logic is R script, by writing this peace of code in php I tried to do the same logic that R script does. But this php programm algorirm probably is not correct so results are incorrect also. I am tryi

Re: [R] r-package RDCOMClient

2007-10-03 Thread Gabor Grothendieck
I have generally found that both RDCOMClient and rcom do work although around the time of new R versions one might be ready for it before the other so try both. On 10/3/07, Marcin Kopaczynski <[EMAIL PROTECTED]> wrote: > hi, > > i was trying to perform a function from the RDCOMClient package. to m

Re: [R] How to avoid overfitting in gam(mgcv)

2007-10-03 Thread Ariyo Kanno
Thank you for valuable advices. I'm sorry Dr. N. Wood that by mistake I sent this reply firstly to your personal e-mail address. I will use the "min.sp" argument when the data size is very small. I'd like to know if there is any criteria for selecting "min.sp." I compared gamma=1.0 and 1.4, and I

[R] r-package RDCOMClient

2007-10-03 Thread Marcin Kopaczynski
hi, i was trying to perform a function from the RDCOMClient package. to make it short: i tried to run the example in ?.COM, namely e <- COMCreate("Excel.Application") books <- e[["Workbooks"]] as soon as e[["Workbooks"]] is called, the RGUI crashes. debugging the function .COM reveals that some

[R] Error in lm.fit(

2007-10-03 Thread Peter Lauren
I am using R.2.4.1 on Windows XP 5.1 (SP 2). I have the following line in my R code. Analysis=anova(lm(PM ~ x)) It works the first 60 or so times it is called but then I get the following error message. Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases I

Re: [R] R 'function' as "subroutine"

2007-10-03 Thread Gabor Grothendieck
1. you could place the commands in a file and source the file each time you want to run it or it might be good enough to place it on the clipboard and then just do source("clipboard") 2. Thomas Lumley's defmacro in R News 1/3 could be used Neither of these two require that you do anything specia

  1   2   >