[R] Recall() and sapply()

2005-03-30 Thread Robin Hankin
Hi. I'm having difficulty following the advice given in help(Recall). Consider the two following toy functions: f1 - function(n){ if(length(n)1){return(sapply(n,f1))} matrix(n,n,n) } f2 - function(n){ if(length(n)1){return(sapply(n,Recall))} matrix(n,n,n) } f1() works as desired (that

Re: [R] From FAQ 7.21 to a command like apply(sapply(list(f1,f2,f3),is.na),2,sum)

2005-03-30 Thread Heinz Tuechler
At 16:13 29.03.2005 -0800, Thomas Lumley wrote: On Wed, 30 Mar 2005, Heinz Tuechler wrote: Dear all, Last December there was a thread regarding the famous FAQ 7.21 How can I turn a string into a variable? and asking what people want to do with these strings. My, certainly trivial

Re: [R] From FAQ 7.21 to a command likeapply(sapply(list(f1,f2,f3),is.na),2,sum)

2005-03-30 Thread Heinz Tuechler
At 09:32 30.03.2005 +0200, Heinz Tuechler wrote: At 16:13 29.03.2005 -0800, Thomas Lumley wrote: On Wed, 30 Mar 2005, Heinz Tuechler wrote: Dear all, Last December there was a thread regarding the famous FAQ 7.21 How can I turn a string into a variable? and asking what people want to do with

[R] locfit

2005-03-30 Thread . .
Hallo all, can somebody tell me if is possible use the locfit function like a semiparametric model. I need to use two explicative variables and one of them is a dummy variable. Thanks Michele - Giochi, Rubrica… Scaricalo ora!

[R] Habituation model

2005-03-30 Thread Laurent Fanchon
Dear all, I am looking at habituation of dogs trotting on a treadmill. I record the ground reaction force and I analyze it with several discrete variables (maximum, minimum,...) For each variable, I get between 40 and 50 data per sample. I record data at time 1 min, 2 min, and 4 min a day,

Re: [R] about memory

2005-03-30 Thread jon butchar
How much memory is free when R fails (e.g., what does top show while trying to run your clustering)? If there's still a sizeable amount of free memory you may have to look into the system limits, maximum data segment size in particular. Many Linux distros have it set to unlimited but default

[R] error messages on R CMD check

2005-03-30 Thread Johannes Hüsing
Dear all, I am trying to wrap up a package. On entering R CMD check, I get the following error messages: [...] * checking S3 generic/method consistency ... WARNING Error in .try_quietly({ : Error in library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) :

Re: [R] Habituation model

2005-03-30 Thread Dimitris Rizopoulos
since you measure the same dog several times its measurements are correlated and you should take this into account in your analysis (i.e., aov() is not appropriate in this case). Probably you could find functions lme() and gls() in the nlme package very useful for your problem and for which a

[R] fastbw question

2005-03-30 Thread Peter Flom
Hello I am running R 2.0.1 on Windows, I am attempting to use Frank Harrell's 'fastbw' function (from the Design library), but I get an error that the fit was not created with a Design library fitting function; yet when I go to the help for fastbw (and also look in Frank's book Regression

[R] discriminant function analysis in R

2005-03-30 Thread Graham Jones
In message [EMAIL PROTECTED], r-help- [EMAIL PROTECTED] writes Dear R Users, I'm very very interested in learning how to use R to carry out a classification of data using discriminant function analysis. I've found the MASS package and the lda function, but the examples in the help system are

Re: [R] Finding the height of a line of text for axis

2005-03-30 Thread Marc Schwartz
On Wed, 2005-03-30 at 11:06 +0100, Steven J. Murdoch wrote: I would like to draw only the ticks of an axis, but not the axis itself. I don't think this can be done using axis(), so I am trying to write a cut-down version in R, which only draws ticks. The point at which I am stuck is that the

RE: [R] Recall() and sapply()

2005-03-30 Thread McGehee, Robert
I doubt it's possible to use Recall inside a sapply like this. sapply (and lapply) make a copy of the function (FUN - match.fun(FUN)) before passing it inside an internal function (rval - .Internal(lapply(X, FUN)). So, while I'm not precisely sure how Recall is coded up, I bet that once it is

Re: [R] Recall() and sapply()

2005-03-30 Thread Gabor Grothendieck
I believe that the function that Recall executes is the function in which Recall, itself, is evaluated -- not the function in which Recall appears. In normal cases these are the same but if you pass Recall to another function then they are not the same. Here Recall is being passed to sapply

Re: [R] about memory

2005-03-30 Thread ronggui
[EMAIL PROTECTED] ulimit -a core file size(blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files(-n) 1024 pipe size

[R] A question about multiple comparison of analysis of covariance using SPSS

2005-03-30 Thread xiaoyun wu
Hi, all, I have a question about multiple comparison of analysis of covariance using SPSS 10. The way I used was in the menu 'Analyze-General Linear Model-Mutivariate'. When I only chosed 'Dependent Variables' and 'Fixed Factor(s)', the button of 'Post Hoc' can be pressed and I can chose some

Re: [R] error messages on R CMD check

2005-03-30 Thread David Firth
Dear Johannes I have noticed the same complaint, and you are right that it can be unconnected with faulty S3 methods, etc., in your package. For example, in my relimp package (current version 0.9-1, new on CRAN today) the DESCRIPTION file has Suggests: tcltk and that works fine (ie it passes

[R] Re:Plotting to A4 and replacing x-axis with actual years.

2005-03-30 Thread Marshall Mdoka
Hie, I have written before and probably missed the reply. 1.) I have my figures in a 3X3 array and want to fit them onto a A4 size page. I have written commands to try a represent them in eps format but still their cutting out information. 2.) I have an odd number of years and wanted to

[R] Re:Plotting to A4 and replacing x-axis with actual years.

2005-03-30 Thread Marshall Mdoka
Hie, I have written before and probably missed the reply. 1.) I have my figures in a 3X3 array and want to fit them onto a A4 size page. I have written commands to try a represent them in eps format but still their cutting out information. 2.) I have an odd number of years and wanted to

RE: [R] about memory

2005-03-30 Thread Huntsinger, Reid
hclust creates a distance matrix. In your case it is 10,000 x 10,000. For various reasons several copies are created, so you probably need at least 100M x 8 bytes per entry x 3 copies = 2.4 GB just for the distance matrix. If you don't have that much RAM the computation will probably take

Re: [R] fastbw question

2005-03-30 Thread Frank E Harrell Jr
Peter Flom wrote: Hello I am running R 2.0.1 on Windows, I am attempting to use Frank Harrell's 'fastbw' function (from the Design library), but I get an error that the fit was not created with a Design library fitting function; yet when I go to the help for fastbw (and also look in Frank's book

[R] R --max-vsize=4000M --max-nsize=4000M

2005-03-30 Thread Pavel Khomski
hello! what's wrong??? i use 32 bit machine. every time i 'm connecting the server to do my work with R on it , after having done R --max-vsize=4000M --max-nsize=4000M i become wrong limits specification for Ncells: . gc() used(Mb) gc

Re: [R] Recall() and sapply()

2005-03-30 Thread Thomas Lumley
On Wed, 30 Mar 2005, Robin Hankin wrote: Hi. I'm having difficulty following the advice given in help(Recall). Consider the two following toy functions: f1 - function(n){ if(length(n)1){return(sapply(n,f1))} matrix(n,n,n) } f2 - function(n){ if(length(n)1){return(sapply(n,Recall))}

Re: [R] Solved - gnuclient problems witrh R/ESS in linux

2005-03-30 Thread Fredrik Lundgren
Finally, I found a way to make fix() and edit() work with gnuclient in ESS-5.2.6/R-2.0.1/Xemacs-21.4.15-r3 on gentoo-linux. When invoking R/ESS the following is induced by ESS options(STERM='iESS', editor='gnuclient -q') It appears as if the problem is with 'gnuclient -q' (whatever does -q

[R] Stratified Bootstrap question

2005-03-30 Thread Tim Hesterberg
Dear Qian, You might try the S+Resample library, which has built-in support for both sampling by subject and stratified sampling. If you are a student, there is a free student version of S+. See www.insightful.com/downloads/libraries (S+Resample) www.insightful.com/Hesterberg/bootstrap (has

[R] Installing GO 1.7.0

2005-03-30 Thread Tom 'spot' Callaway
I'm in the process of packaging R (and R modules) for future inclusion in Fedora Extras, and I've managed to get several hundred modules installed without issue, however, the GO metadata package is refusing to comply. Since I'm packaging this in rpm format, I can't use any of the automated

Re: [R] how i can get input from user input

2005-03-30 Thread Greg Snow
Also look at ?readline Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 Uwe Ligges [EMAIL PROTECTED] 03/29/05 11:43PM Cuichang Zhao wrote: Hello, Could you please tell me how i can get an input from the user in R? Depends on the kind of input. See, e.g., ?scan or

Re: [R] about memory

2005-03-30 Thread jon butchar
Yes, you may need more memory unless you can somehow free a good amount of RAM or find a more memory-efficient method for clustering. If I'm reading it correctly, R wanted to allocate about 382 MB memory on top of what it had already taken but your computer had only about 98 MB swap plus about

Re: [R] Installing GO 1.7.0

2005-03-30 Thread Seth Falcon
Hi Tom, I'm cc'ing to Bioconductor as that is probably a better place for the discussion. Tom 'spot' Callaway [EMAIL PROTECTED] writes: I'm in the process of packaging R (and R modules) for future inclusion in Fedora Extras, and I've managed to get several hundred modules installed without

Re: [BioC] Follow-up to: [R] Annotation metadata kills help.search

2005-03-30 Thread Seth Falcon
Gerard Tromp [EMAIL PROTECTED] writes: Greetings, this is a follow-up to the mailing below. Seth Falcon replied and indicated that he and several others were unable to replicate the problem. Specifically he requested: We are not able to reproduce this issue. If you reinstall

RE: [R] how i can get input from user input

2005-03-30 Thread Berton Gunter
If you are on Windows and want to go GUI, see ?choose.files, ?winMenuAdd, ?winDialog, ?select.list -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original

[R] Step error

2005-03-30 Thread vasilis pappas
Could anyone tell me what am I doing wrong? pro-function(indep,dep){ + d-data.frame(indep) + form-formula(lm(dep~.,data=d)) + forward-step(lm(dep~X1,data=d),scope=form,trace=0,direction='f') + return(forward) + } pro(m,q) Error in inherits(x, data.frame) : Object d not found Where q is a

[R] compute adjusted mean

2005-03-30 Thread Steven Lu
Dear Sir/Madam: I have a question about computing adjusted mean using R. I am really new to this area. Suppose I have a response Y, and covariate: treat (binary), sex (binary) race (catogorical ) and age (continuous). the model: Y~treat+sex+race+age; I am asked to compute the adjusted mean of

[R] PDF and PS output

2005-03-30 Thread Hans Halvorson
I'm using R 2.0 on Redhat Linux 9. When I try to produce PDF or PS output, the files are corrupted -- they won't open in Acroread, xpdf, ggv, and on attempting to convert to PNG, I get message This file has corrupted %%EOF marker. Perhaps I am just doing something wrong. I did: pdf()

Re: [R] Stratified Bootstrap question

2005-03-30 Thread Qian An
Dear Tim, Thank you very much for your information. I will try to play with S+ as you suggested. At the same time, I would like to share our idea with you about the stratified bootstrapping for my scenario. I am not sure if it is correct. I am playing with it now. We created a new dataset

Re: [R] PDF and PS output

2005-03-30 Thread Hans Halvorson
Ach -- such a simple mistake. Thank you for pointing out my error, and I apologize for wasting your time. Best wishes, Hans Peter Dalgaard [EMAIL PROTECTED] writes: Hans Halvorson [EMAIL PROTECTED] writes: I'm using R 2.0 on Redhat Linux 9. When I try to produce PDF or PS output, the

Re: [R] PDF and PS output

2005-03-30 Thread Ulises M. Alvarez
Hi: dev.off() Check your file now... That's it! Hans Halvorson wrote: I'm using R 2.0 on Redhat Linux 9. When I try to produce PDF or PS output, the files are corrupted -- they won't open in Acroread, xpdf, ggv, and on attempting to convert to PNG, I get message This file has corrupted %%EOF

Re: [R] Stratified Bootstrap question

2005-03-30 Thread Qian An
Dear Tim, Thank you so much for your help. My random mixed model is as follows: b.lme - lme(sbp ~ age + gender, data=bdat, random=~1/clinic/id, na.action=na.omit) When doing bootstrap with stratum clinic, a patient's data may appear multiple times in the boostrap dataset and all of

[R] French Curve

2005-03-30 Thread dream home
Dear R experts, Did someone implemented French Curve yet? Or can anyone point me some papers that I can follow to implement it? thanks in advance for your help. Paul __ R-help@stat.math.ethz.ch mailing list

Re: [R] Base and lattice graphics on the same graphics page

2005-03-30 Thread Paul Murrell
Hi Deepayan Sarkar wrote: On Tuesday 29 March 2005 22:32, John Maindonald wrote: Although base graphics does not mix with lattice in the one graph, I've found that print.trellis(position=..., ) and the use of par(fig=...) to put regular and trellis graphics on the one graphics page works like a

Re: [BioC] Follow-up to: [R] Annotation metadata kills help.search

2005-03-30 Thread Seth Falcon
Hello Gerard, all, The annotation packages breaking help.search was due to improperly built annotation packages. We have posted updated annotation packages to the Bioconductor meta data repository. Reinstalling the annotation data packages should resolve the issue and allow help.search to

RE: [R] NA's?

2005-03-30 Thread Bill.Venables
Your message doesn't help us very much. You haven't said what kind of calculation it is you want to do, and that certainly matters. For example, for some kinds of computations the solution you started below would work fine: M - matrix(1:16, 4, 4) is.na(diag(M)) - TRUE M [,1] [,2] [,3]

RE: [R] 2d plotting and colours

2005-03-30 Thread Mulholland, Tom
Since I was only concentrating on colour issues and not on your specific problem I was just showing the possibilities. Does this code help n - 5 par(mfrow = c(2,2)) palette(default) barplot(1:25,col = 1:25) palette(rainbow(n)) barplot(1:25,col = 1:25) palette(rgb((0:15)/15, g=0,b=0,

[R] Using kmeans given cluster centroids and data with NAs

2005-03-30 Thread Sophie.Bestley
Hello, I have used the functions agnes and cutree to cluster my data (4977 objects x 22 variables) into 8 clusters. I would like to refine the solution using a k-means or similar algorithm, setting the initial cluster centres as the group means from agnes. However my data matrix has NA's in it

RE: [R] NA's?

2005-03-30 Thread Mulholland, Tom
See upper.tri and lower.tri. I think that you might also look for specific packages that function using matrices, from what I have seen these often have the capacity to ignore the diagonal or use just the upper or lower triangle. This is not an area that I use very much, but I have seen

RE: [R] Using kmeans given cluster centroids and data with NAs

2005-03-30 Thread Mulholland, Tom
Does ?na.omit help x - kmeans(na.omit(data),centres) of course if you have too many NAs you need to be sure that their removal does not unduly influence the results. Although I am a bit confused as I thought that agnes did not allow NAs. I assume that you are running an alternative clustering

RE: [R] NA's?

2005-03-30 Thread Asha Jayanthi
I am sorry about that. I like to do column mean, sd, var as well as kmeans on the matrix does this na.rm = TRUE work for such fuctions and only the diagonal is ignored? From: [EMAIL PROTECTED] To: [EMAIL PROTECTED],r-help@stat.math.ethz.ch Subject: RE: [R] NA's? Date: Thu, 31 Mar 2005 11:42:05

RE: [R] NA's?

2005-03-30 Thread Asha Jayanthi
i have not answered your query in the last mail. I hoped na.omit(M) will just ingnore the diagonal elements. i learnt by practice that it removes the whole row which has atleast one NA!! (that is not the case in Perl) Since I am bit new to R, i did not knew how to just ignore those elements in

[R] Can I extract result row of table()?

2005-03-30 Thread Terry Mu
x - c(5, 5, 8, 8, 8, 27) table(x) x 5 8 27 2 3 1 I want a way to use only 2, 3, 1, nomatter table or what other function used. Thanks. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Can I extract result row of table()?

2005-03-30 Thread Uwe Ligges
Terry Mu wrote: x - c(5, 5, 8, 8, 8, 27) table(x) x 5 8 27 2 3 1 I want a way to use only 2, 3, 1, nomatter table or what other function used. as.vector() removes the attributes, if that is your question. Uwe Ligges Thanks. __

RE: [R] 2d plotting and colours

2005-03-30 Thread Asha Jayanthi
Thank you. mycols - c(brown,orange,tomato) plot(x,col = mycols[cl$cluster]) this works. I can define distinct colours and check the graph. the rest of the examples does not give a wide palette to choose from Asha From: Mulholland, Tom [EMAIL PROTECTED] To: Asha Jayanthi [EMAIL

RE: [R] 2d plotting and colours

2005-03-30 Thread Mulholland, Tom
I'm not sure that I understand you comment about the other examples not giving a wide palette. Are you using wide to refer to the difference in colours rather than the number of choices in the palette? If this is your issue you should look at the dichromat package that I referred to, in

RE: [R] NA's?

2005-03-30 Thread Bill.Venables
is.na(diag(M)) - TRUE cmeans - colMeans(M, na.rm = TRUE) csd - apply(M, 2, sd, na.rm = TRUE) cvar - csd ^2 (or cvar - apply(M, 2, var, na.rm = TRUE) ) Using 'kmeans' on a matrix but 'ignoring the diagonal entries' just doesn't make sense as it stands, so I can't help you there. V.

RE: [R] how i can get input from user input

2005-03-30 Thread Martin Maechler
BertG == Berton Gunter [EMAIL PROTECTED] on Wed, 30 Mar 2005 10:09:38 -0800 writes: BertG If you are on Windows and want to go GUI, see BertG ?choose.files, ?winMenuAdd, ?winDialog, ?select.list with the big drawback that it will only work on Windows. As Uwe says below, it depends

Re: [R] Problems with lpSolve/Memory ? R crashes

2005-03-30 Thread Arne Henningsen
Unfortunately, I can't tell you how to solve this problem. However, I can confirm that this crash happens also on my machines (R 2.0.1 on Debian Sarge, AMD Athlon, 750 MHz, 256 MB RAM and R 2.0.0 on SuSE 9.0, Intel P4, 2.6 GHz, 512 MB RAM): R aaa(1000) alloc of 8 bytes failed alloc of 4

Re: [R] Finding the height of a line of text for axis

2005-03-30 Thread Steven J. Murdoch
Thanks for your reply. On Wed, Mar 30, 2005 at 08:03:10AM -0600, Marc Schwartz wrote: or even something like this: plot(1:5, axes = FALSE) axis(1, col.axis = white, col = red, tcl = 1) axis(1, col.axis = white, col = white, tcl = 0) axis(2, col.axis = white, col = red, tcl = 1)

[R] Cox model qustion in R

2005-03-30 Thread Chao Zhu
Dear all, I have a beginner's R question for coxph() and survfit(). I have a data set with survival time (no censoring) and treatment indicator(0/1). I did something like fit-coxph( Surv(t)~treat, method=breslow,data=data) fit Call: coxph(formula = Surv(t) ~ treat, data = data, method =

Re: [R] Finding the height of a line of text for axis

2005-03-30 Thread Paul Murrell
Hi Steven J. Murdoch wrote: Thanks for your reply. On Wed, Mar 30, 2005 at 08:03:10AM -0600, Marc Schwartz wrote: or even something like this: plot(1:5, axes = FALSE) axis(1, col.axis = white, col = red, tcl = 1) axis(1, col.axis = white, col = white, tcl = 0) axis(2, col.axis = white, col = red,

RE: [R] Re:Plotting to A4 and replacing x-axis with actual years.

2005-03-30 Thread Mulholland, Tom
I think you need to read the posting guide (see the bottom of each post made) and once you have done this take some time to compose your message. The issue is that I have too little information about what you have done. It looks to me as if you are using postscript, but I am not sure if you

RE: [R] 2d plotting and colours

2005-03-30 Thread Asha Jayanthi
Thank you very much. the code plot(x, col = s) points(cl$centers, col = s, pch = 8, cex=2) does not plot the points according to the group colors. The plots are used to identify the groups by colors That could be done by plot(x, col = cl$cluster) This means that we need to set the default

[R] NA's?

2005-03-30 Thread Asha Jayanthi
I have a large matrix of data . The size of the matrix ranges from 100 x 100 to 1000 x 1000 Now i have to do computations on that. And should not consider the diagonal elements. I tried setting diag(M) = NA and M = na.omit(M). But this omits all the rows. I only want to omit that diagonal

[R] Contingency table: logistic regression

2005-03-30 Thread Suresh Krishna
Hi, I am analyzing a data set with greater than 1000 independent cases (collected in an unrestricted manner), where each case has 3 variables associated with it: one, a factor variable with 0/1 levels (called XX), another factor variable with 8 levels (X) and a third response variable with two

[R] Re: Contingency table: logistic regression

2005-03-30 Thread Suresh Krishna
Oops, I corrected some errors in the first paragraph; sorry for the repeated posting. Suresh ~~ Hi, I am analyzing a data set with greater than 1000 independent cases (collected in an unrestricted manner), where each case has 3