Re: [R] Clean programming with R

2007-11-25 Thread cgenolin
>> library(codetools) >> findGlobals(power) Thanks for your answer. In addition, findGlobals(power,FALSE) gives the list of the globals variables alone : > findGlobals(power,F) $functions [1] "^" "{" "<-" "return" $variables [1] "pp" -

Re: [R] determine the number of digits printed into graph with "text(...)"

2007-11-25 Thread Prof Brian Ripley
Your misunderstanding is that this is not 'printing'. From ?text: labels: a character vector or expression specifying the _text_ to be written. An attempt is made to coerce other language objects (names and calls) to expressions, and vectors and other classed

[R] Odp: help in plotting

2007-11-25 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 24.11.2007 08:55:54: > Dear list, > > I want to combine several plots in one graph. > I did this: plot(a1); plot(a2, add=TRUE); ...plot(a5, add=TRUE) > The problem is the more plot we put, the more complex the graph. > Is there any way to label each line; or other

Re: [R] Plotting + saving to file on Linux

2007-11-25 Thread peter360
Yep you are right on=) Both worked after I followed dev.copy with dev.off. Thanks! > You likely forgot dev.off() after dev.copy. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of

Re: [R] testing independence of categorical variables

2007-11-25 Thread Shoaaib Mehmood
i cant find help for xtab. Which package contains this function On Nov 24, 2007 12:16 PM, G Ilhamto <[EMAIL PROTECTED]> wrote: > hi shohaib, > have you tried xtab instead of chisq.test? > > Ilham > > > > On Nov 22, 2007 6:16 AM, Shoaaib Mehmood <[EMAIL PROTECTED]> wrote: > > > > > > > > hi, > > >

[R] CPCA?

2007-11-25 Thread Daniel Berner
It would be great to know if and where an R code for Common Principal Component Analysis is available. Thanks, Daniel Daniel Berner Redpath Museum & Dept. of Biology McGill University 859 Sherbrooke St. W. Montreal, QC, H3A 2K6 Canada Phone: 514-398-4086 ext. 00908 Fax: 514-398-3185 Email: [EMAIL

Re: [R] R as server application

2007-11-25 Thread David Katz
This sounds useful, but can you give more info on "forward X...". Thanks. Scionforbai wrote: > > Do you need something more than a simple ssh connection to a remote > host in which you run R (trivial when the server is Linux)? > > My advice is to run R in a "screen" session on the remote host

Re: [R] Any useR conference in US in YR2008

2007-11-25 Thread elw
Something like this - alternating among continents - happens with AoIR, the Association for Internet Research. A real effort has been made to make sure that the conference is in North America no more than every other year, with alternating slots going to Europe and (once so far..) to Austra

Re: [R] Install repeated library

2007-11-25 Thread Simon Blomberg
The repeated package is on CRAN. I installed it successfully from there. Simon. On Sun, 2007-11-25 at 10:41 -1200, Becky Parker wrote: > Hello - > > I cannot get to > www.alpha.luc.ac.be/~jlindsey/rcode.htmlto > obtain and install the repeated l

[R] problem in closing R console

2007-11-25 Thread amna khan
Dear Sir When I close R console then following message apear when I want to save the workspace. If I close the R console without saving workspace then R console is closed otherwise not. Error in gzfile(file, "wb") : unable to open connection In addition: Warning message: In gzfile(file, "wb") : c

Re: [R] Packages - a great resource, but hard to find the right one

2007-11-25 Thread hadley wickham
> As for who should do the review, I wouldn't trust so much any user as I > would an organization such as the JSS. If the latter is not possible, the > first alternative is better than nothing. Of course, it doesn't have to be one or the other, but both could be included. It would be also nice to

Re: [R] determine the number of digits printed into graph with "text(...)"

2007-11-25 Thread jim holtman
sprintf("%.2f", fraction) On Nov 25, 2007 10:00 PM, Georg Ehret <[EMAIL PROTECTED]> wrote: > Dear R comunity, > I am printing a number in a graph using "text(...)" - see code > below: "fraction" is my number. I wish to print only two digits of the > number and struggle to do this... options(dig

[R] Install repeated library

2007-11-25 Thread Becky Parker
Hello - I cannot get to www.alpha.luc.ac.be/~jlindsey/rcode.htmlto obtain and install the repeated library for use of glmm(). Is the web page not active? Can you give me an alternative location to obtain the repeated library? Thank you, Becky P

Re: [R] determine the number of digits printed into graph with"text(...)"

2007-11-25 Thread Peter Alspach
Georg ?format (or simply ?round if you are happy to drop the occasional final 0) HTH ... Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Georg Ehret > Sent: Monday, 26 November 2007 4:00 p.m. > To: r-help > Subject: [R] deter

[R] Assessing accuracy of clustering output

2007-11-25 Thread Y.Xia - Final Year Mathematician
Dear All,Say I've got a 2 by 3 data matrix with numerical entries A, B, C, D. The 3rd column labels the real cluster of these values (A and B belong to cluster 1 and C, D belong to cluster 2.) Now if I perform a clustering algorithm such as kmeans on those numerical part of the matrix with pre-spec

[R] time series analysis with covariates

2007-11-25 Thread Daniel Malter
Hi, I am trying to analyze a time series with covariates. Since I have basically no prior experience with time series modeling, I followed a procedure suggested by Wooldridge, but I slightly changed the procedure and wanted to ask whether it is sound or flawed in your opinion. Wooldridge suggests

Re: [R] Packages - a great resource, but hard to find the right one

2007-11-25 Thread diegol
Hi all, I've been reading your suggestions and I'd like to share my thoghts, which might be common to people not so deeply involved in the development of R. One of the advantages of R is that it's an open source software, meaning that anyone can peruse the code for whatever purpose they might ha

[R] determine the number of digits printed into graph with "text(...)"

2007-11-25 Thread Georg Ehret
Dear R comunity, I am printing a number in a graph using "text(...)" - see code below: "fraction" is my number. I wish to print only two digits of the number and struggle to do this... options(digit=3) does not work... Thank you for your suggestions! Cheers, Georg.

[R] about Runtime Error

2007-11-25 Thread Xin Huang
Hi, I wrote my own R program doing some MCMC simulation but I often got "Runtime Error" even the program only run for a couple of hundred times. The detail error message is as following: Runtime Error! Program: C:\Program Files\R\R-2.5.1\bin\Rgui.exe This application has requested the Runtime to

Re: [R] Heatmap problem

2007-11-25 Thread Gregory Warnes
Hi Allen, The dotted line is an 'extra' feature to help quantify the difference between adjacent color boxes. It can be turned off by using the argument heatmap.2(..., trace="none"). For more details do library(gplots) ?heatmap.2 -G On Nov 22, 2007, at 12:03PM , affy snp w

Re: [R] Packages - a great resource, but hard to find the right one

2007-11-25 Thread Bert Gunter
Antony, et. al.: Could this be better handled by just having a place on CRAN for users to express their (unedited/unrefereed, other than to keep thing within the bounds of civility and courteous information sharing) extended opinions rather than formal reviews, akin to the numerous websites hostin

Re: [R] rowMean, specify subset of columns within Dataframe?

2007-11-25 Thread aaront
Thank you all. So that I look up the relevant Help topic more fully, the part that extracts the columns of interest: [, c(1, 3:4)] is this an instance of ?Subscript which Charles directs me to? Cheers, Aaron Bill.Venables wrote: > > Suppose you want to select column 1, 3 and 4 only. >

Re: [R] attribute evaluation

2007-11-25 Thread Max Kuhn
Julia, Try using something like RSiteSearch("gain") and see what you get. Max On Nov 25, 2007 5:43 PM, "Julia Kröpfl" <[EMAIL PROTECTED]> wrote: > Hey there! > > I am searching for an attribute evaluation algorithm (such as based on Info > gain, Gain ratio or Chi squared statistics). > > I

Re: [R] rowMean, specify subset of columns within Dataframe?

2007-11-25 Thread Bill.Venables
Suppose you want to select column 1, 3 and 4 only. ### you don't need the cbind(...) here Data1 <- data.frame(I1 = 3, I2 = c(0, 3:1, 2:5, NA), I3 = c(1:4, NA, 5:2), I4 = 2, I5 = 3) Data1$mean_134 <- rowMeans(Data1[, c(1, 3:4)], na.rm = TRUE) Data1 Bill Venables. -Original Message-

[R] attribute evaluation

2007-11-25 Thread Julia Kröpfl
Hey there! I am searching for an attribute evaluation algorithm (such as based on Info gain, Gain ratio or Chi squared statistics). Is something like that available in R? Thanks for your reply. Best regards, Julia -- __ R-help@r-project.org mailing

Re: [R] how to wait after plotting in BATCH mode?

2007-11-25 Thread Henrique Dallazuanna
Perhaps you can use the Sys.sleep function in the final of file: plot(rnorm(100)) Sys.sleep(5) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 25/11/2007, Jonas Stein <[EMAIL PROTECTED]> wrote: > when i plot with the following command on console: > $ R CMD BATCH c

[R] Set the grid.layout programmatically?

2007-11-25 Thread Felipe Carrillo
Hello all: Does anyone know if the grid layout function can be set dynamically? For example if I have a column that will be changing as new data is added monthly I would like grid to detect the new data and create another row or column for the new plot on the same window instead of adding the new l

Re: [R] help in plotting

2007-11-25 Thread David Winsemius
Duncan Murdoch <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On 25/11/2007 1:00 PM, John Kane wrote: >> That code seems to put the legend basically out of >> range. >> >> For the last line try x= 8 rather than 10. >> >> legend(x=8,y=.3,paste("Scale=",c(1,2,4,8)),lty=1:4) > > Or use on

Re: [R] rowMean, specify subset of columns within Dataframe?

2007-11-25 Thread Charles C. Berry
On Sun, 25 Nov 2007, aaront wrote: > > I would like to calculate the mean of tree leader increment growth over 5 > years (I1 through I5) where each tree is a row and each row has 5 columns. > So far I have achieved this using rowMeans when all columns are numeric type > and used in the calculation

Re: [R] Constructin a call of function including permutation of column names - how to escape parentheses?

2007-11-25 Thread Tae-kyun Kim
Hi, I guess this may be a way to construct a list of character vectors from variable names. > library(gregmisc) > mycolnames <- LETTERS[1:12] > combinations.2<-combinations(12,2,mycolnames) > arg.list <- as.list(as.data.frame(t(combinations.2), stringsAsFactors=FALSE)) > names(arg.list) <- paste(

[R] rowMean, specify subset of columns within Dataframe?

2007-11-25 Thread aaront
I would like to calculate the mean of tree leader increment growth over 5 years (I1 through I5) where each tree is a row and each row has 5 columns. So far I have achieved this using rowMeans when all columns are numeric type and used in the calculation: Data1 <- data.frame(cbind(I1 = 3, I2 = c(0

[R] spec.pgram() - circularity of kernel

2007-11-25 Thread Nuno Prista
Hi, I am far from experienced in both R and time series hence the question. The code for spec.pgram() seems to involve circularity of the kernel (see below) yielding new power estimates to all frequencies computed by FFT. " if (!is.null(kernel)) { for (i in 1:ncol(x)) for (j in 1:n

Re: [R] truncated fields with RODBC

2007-11-25 Thread Mikkel Grum
Thanks. I tried the following syntax and got the same error message: sqlSave(pg, Grids, append = TRUE, rownames = FALSE, typeInfo = list(double = "double precision", integer = "integer", character = "text")) Warning messages: 1: In odbcUpdate(channel, query, mydata, paramdata, test = tes

Re: [R] help in plotting

2007-11-25 Thread Duncan Murdoch
On 25/11/2007 1:00 PM, John Kane wrote: > That code seems to put the legend basically out of > range. > > For the last line try x= 8 rather than 10. > > legend(x=8,y=.3,paste("Scale=",c(1,2,4,8)),lty=1:4) Or use one of the named locations, e.g. legend("topright",paste("Scale=",c(1,2,4,8)),lty=1

[R] spec.pgram() - circularity of kernel

2007-11-25 Thread Nuno Prista
Hi, I am far from experienced in both R and time series hence the question. The code for spec.pgram() seems to involve a circularity of the kernel (see below) yielding new power estimates to all frequencies computed by FFT. " if (!is.null(kernel)) { for (i in 1:ncol(x)) for (j in 1:

[R] accessing the "address" of items in a recursive list

2007-11-25 Thread Jesse D Lecy
Dear useRs, I am working on a project involving the clustering of a large dataset. I need to extract specific sub-clusters from the parent dendrogram for further analysis. The data is too large for the use of convenient tools such as identify.clust (it selects the specific group of interest o

Re: [R] R2winBUGS & WinBUGS gui

2007-11-25 Thread Ben Bolker
Evan Cooch wrote: > > >> >> Yes, sure, and indeed, it is a shame that nobody of those people who >> want it to work under Linux is trying to submit patches to make it work. >> >> >> > I agree, but I *think* the primary reason for this is that it requires > installing Blackbox as a PASCAL com

Re: [R] help in plotting

2007-11-25 Thread John Kane
That code seems to put the legend basically out of range. For the last line try x= 8 rather than 10. legend(x=8,y=.3,paste("Scale=",c(1,2,4,8)),lty=1:4) --- David Winsemius <[EMAIL PROTECTED]> wrote: > "G Ilhamto" <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > > > I want to combin

Re: [R] complex conjugates roots from polyroot?

2007-11-25 Thread Spencer Graves
Hi, Ravi: Question: Are duplicate real numbers complex conjugates? For some purposes, perhaps. However, for identifying (damped) periodicity on a difference or differential equation, we must exclude repeated real roots. In any event, your suggestion inspired me to create a fun

Re: [R] howto remove all variables (cleanup)

2007-11-25 Thread John Kane
I see a couple of people have already supplied rm(list=ls()) A function that I find useful is the ?keep in the gdata library. It allows you to keep just a few things that you want to work with and clean up all the odds & sods. --- Jonas Stein <[EMAIL PROTECTED]> wrote: > Hi, > > as i am quit

Re: [R] R2winBUGS & WinBUGS gui

2007-11-25 Thread Evan Cooch
> > Yes, sure, and indeed, it is a shame that nobody of those people who > want it to work under Linux is trying to submit patches to make it work. > > > I agree, but I *think* the primary reason for this is that it requires installing Blackbox as a PASCAL compiler. For much of the Linux commun

Re: [R] R2winBUGS & WinBUGS gui

2007-11-25 Thread Uwe Ligges
Evan Cooch wrote: >> No. The idea is to use BRugs, i.e. OpenBUGS in such cases. If OpenBUGS >> lacks some features, you are certainly welcome to implement them and >> send patches to Andrew Thomas. >> > > Just finished trying the install of openBUGS under linux yet again. Same > problems (mor

Re: [R] R2winBUGS & WinBUGS gui

2007-11-25 Thread Evan Cooch
> > No. The idea is to use BRugs, i.e. OpenBUGS in such cases. If OpenBUGS > lacks some features, you are certainly welcome to implement them and > send patches to Andrew Thomas. > Just finished trying the install of openBUGS under linux yet again. Same problems (more or less), which I'll list

Re: [R] 'Split' character

2007-11-25 Thread Gabor Grothendieck
Try this using the BOD data frame that comes with R or try using interaction in place of paste: split(BOD, do.call(paste, c(BOD, sep = ":")), drop=TRUE) On Nov 25, 2007 10:23 AM, <[EMAIL PROTECTED]> wrote: > > > Thanks Jim and Herinque for you reply. > > The substitution you are both proposing

Re: [R] R2winBUGS & WinBUGS gui

2007-11-25 Thread Evan Cooch
> > No. The idea is to use BRugs, i.e. OpenBUGS in such cases. If OpenBUGS > lacks some features, you are certainly welcome to implement them and > send patches to Andrew Thomas. > > Thanks very much. I thought as much, but given that I have had a 0% success rate in getting OpenBUGS to run on

Re: [R] Package Building under Windows with MikTeX 2.6

2007-11-25 Thread Duncan Murdoch
Mark Hempelmann wrote: > Dear WizaRds, > > I wrote a small function in R and would like to create a package. The > necessary documentation is done, Rtools etc. are installed and I am > still unable to complete the process under Windows. I did extensive > research in the archives and read t

Re: [R] R2winBUGS | option to turn off GUI?

2007-11-25 Thread Uwe Ligges
Same answer as the one for your other R-help question "[R] R2winBUGS & WinBUGS gui" (November 23). Folks, sometimes people (like me in this case) are out of office and then it might take more then an hour to answer your questions... Best, Uwe Ligges Evan Cooch wrote: > Greetings - > > I run

Re: [R] Hmisc: can not reproduce figure 4 of Statistical Tables and Plots using S and LATEX

2007-11-25 Thread Frank E Harrell Jr
John Smith wrote: > Dear R-users: > > I can not reproduce figure 4 of *Statistical Tables and Plots using S and > LATEX* by Prof. Frank Harrell with the following code: > > rm(list=ls()) > library(Hmisc) > > getHdata(pbc) > attach(pbc) > age.groups <- cut2(age, c(45,60)) > g <- function(y) apply

Re: [R] Cluster Analysis:build a classifier?

2007-11-25 Thread x_x
Dear Uwe, Thank you very much for your reply, I think that's why I've done lots of research on this to no avail. And also, thanks for the suggestion on the signature. Best wishes, Yang Uwe Ligges wrote: > > x_x wrote: >> Dear All, >> I'm currently doing a project about unsupervised learning, an

[R] Package Building under Windows with MikTeX 2.6

2007-11-25 Thread Mark Hempelmann
Dear WizaRds, I wrote a small function in R and would like to create a package. The necessary documentation is done, Rtools etc. are installed and I am still unable to complete the process under Windows. I did extensive research in the archives and read the Murdoch-Sutherland website on

Re: [R] intercept in lars fit

2007-11-25 Thread Uwe Ligges
Young Cho wrote: > I am trying to extract coefficients from lars fit and can't find how to get > intercept. E.g. Are we talking about the function lars() from package "lars"? > y = rnorm(10) > x = matrix(runif(50),nrow=10) > X = data.frame(y,x) > fit1 = lars(as.matrix(X[,2:6]),as.matrix(X[,1]

Re: [R] R2winBUGS & WinBUGS gui

2007-11-25 Thread Uwe Ligges
Evan Cooch wrote: > I am trying to figure out if it is possible to run winBUGS from within > R, using R2winBUGS, without having winBUGS spawn any windows (basically > - 'true' batch - no GUI actions at all). The reason being I have a > machine which I (and several others) ssh/telnet into, and

Re: [R] Cluster Analysis:build a classifier?

2007-11-25 Thread Uwe Ligges
x_x wrote: > Dear All, > I'm currently doing a project about unsupervised learning, and I'll be using > R to analyse a few network traffic datasets downloaded off Andrew Moore's > website > (http://www.cl.cam.ac.uk/Research/SRG/netos/nprobe/data/papers/sigmetrics/index.html). > > > Could anyone

Re: [R] 'Split' character

2007-11-25 Thread pomchip
Thanks Jim and Herinque for you reply. The substitution you are both proposing works fine, except when a or b contains decimal numbers (which is mostly my case in a real dataset). In this case, there is no distinction between the decimal point and the one introduced by the split function. If the

[R] Constructin a call of function including permutation of column names - how to escape parentheses?

2007-11-25 Thread Jiří Voller
Dear R-users, I would like to construct a list of arguments for a function in a format function (list(item1=c("A","B"), item2=c("B","C")), item3=...): The individual vectors in the list are permutations of colnames of a dataframe. The trouble is that I am not able to handle escaping of parentheses

[R] how to wait after plotting in BATCH mode?

2007-11-25 Thread Jonas Stein
when i plot with the following command on console: $ R CMD BATCH cp_messung.R in the R-script i wrote x11() in the beginning, so it draws a nice plot on my screen. But sadly it disappeares after a second or two. How can i make it to wait until i press a key or something? thank you. -- kind reg

[R] What is the "deviance " and the "ch ange in deviance" of a logistic regression?

2007-11-25 Thread Bin Yue
Dear all: I am confounded by the "deviance" and the "change in deviance" of a logistic regression ? I have a object like this: summary(glm1) Call: glm(formula = status ~ no.filter + light.filter_2, family = binomial, data = re) Deviance Residuals: Min 1Q Median

Re: [R] howto remove all variables (cleanup)

2007-11-25 Thread Gabor Csardi
rm(list=ls()) G. On Sun, Nov 25, 2007 at 01:12:19PM +0100, Jonas Stein wrote: > Hi, > > as i am quite new to R i often play around with commands in R until my graph > looks nice. > > After testing things there are often lots of variables left. How can i reset > all vars in one command before i

Re: [R] howto remove all variables (cleanup)

2007-11-25 Thread Denver XU
rm(list=ls(all=TRUE)) but be careful to use it. 2007/11/25, Jonas Stein <[EMAIL PROTECTED]>: > Hi, > > as i am quite new to R i often play around with commands in R until my graph > looks nice. > > After testing things there are often lots of variables left. How can i reset > all vars in one com

[R] howto remove all variables (cleanup)

2007-11-25 Thread Jonas Stein
Hi, as i am quite new to R i often play around with commands in R until my graph looks nice. After testing things there are often lots of variables left. How can i reset all vars in one command before i do the final plot? At the moment i restart rkward (my editor) but thats a bit uncomfortable.

Re: [R] truncated fields with RODBC

2007-11-25 Thread Prof Brian Ripley
You need to study the RODBC documentation: you haven't set the type of the character fields in the database table correctly (in fact, you seem not to have set them at all, hence will get the default of varchar(255)). The 64k limit is for reading, not writing. As ever, full details and a reprodu

Re: [R] R 2.6 and library(survival)

2007-11-25 Thread Prof Brian Ripley
There is a reproducible example in the MASS survival chapter. I've reported this to the survival maintainer more than once: it's a partial matching problem. On Sat, 24 Nov 2007, Ben Bolker wrote: > > > > makis motakis-2 wrote: >> >> Hi all, >> >> I have installed in R 2.6 the survival package

Re: [R] how to calculate the return?

2007-11-25 Thread Gabor Grothendieck
On Nov 25, 2007 3:25 AM, Denver XU <[EMAIL PROTECTED]> wrote: > thank you Gabor, I am sure my data is a data.frame and I think you a > lillte bit misunderstood my question. Quoting your post: "data is a matrix" Also are you sure you want diff(log(x))? Your x's include negative numbers. > thank

[R] GAM with constraints

2007-11-25 Thread lubaroz
Hi, I am trying to build GAM with linear constraints, for a general link function, not only identity. If I understand it correctly, the function pcls() can solve the problem, if the smoothness penalties are given. What I need is to incorporate the constraints before calculating the penalties. Can

Re: [R] how to calculate the return?

2007-11-25 Thread Denver XU
thank you Gabor, I am sure my data is a data.frame and I think you a lillte bit misunderstood my question. thank you Patrick, your answer is what I want to find. 2007/11/24, Denver XU <[EMAIL PROTECTED]>: > Hi, R-users, > data is a matrix like this > AMR BS GE HR