Re: [R] create .exe file with R?

2008-06-19 Thread Prof Brian Ripley
See 'Writing R Extensions' On Thu, 19 Jun 2008, Hua Li wrote: Dear all, I'm writing to check with you whether there is a way to create .exe file(or something like that) with R. Now working on creating a program to take inputs from users (with tcl/tk), I would appreciate any idea to make the

Re: [R] Pointwise Confidence Bounds on Logistic Regression

2008-06-19 Thread Prof Brian Ripley
On Thu, 19 Jun 2008, Bryan Hanson wrote: Thanks so much to all who offered assistance. I have to say it would have taken me a long time to figure this out, so I am most grateful. Plus, studying your examples greatly improves my understanding. As a follow up, the fit process gives the followin

Re: [R] Howto reduce number of ticks in X, Y axis while still containing all the data

2008-06-19 Thread Dieter Menne
Gundala Viswanath gmail.com> writes: > I am trying to plot 100 x 100 matrix data in a level plot. > The problem I have is that the x/y -axis label in ticks > are jumbled together. Thus I want X/Y axis to contain > 10 ticks only, yet still plotting all the 100 data. > > Is there a way to do it? >

[R] probit analysis with natural response

2008-06-19 Thread Jinsong Zhao
Dear all, I have try to use mle() from package stats4 to estimate parameters of the following model: p = Pr(Y = 0) = C + (1 - C)F(x'\beta) a probit model with natural response. The log-likelihood function is: fr <- function(c, alpha, beta) { P <- c + (1-c) * pnorm(alpha + beta * x) P <- pmax

[R] Howto reduce number of ticks in X, Y axis while still containing all the data

2008-06-19 Thread Gundala Viswanath
Hi I am trying to plot 100 x 100 matrix data in a level plot. The problem I have is that the x/y -axis label in ticks are jumbled together. Thus I want X/Y axis to contain 10 ticks only, yet still plotting all the 100 data. Is there a way to do it? The code I have below doesn't work. __BEGIN__

Re: [R] Programming Concepts and Philosophy

2008-06-19 Thread Simon Blomberg
I try to use a functional programming style. I define functions within functions when it is helpful in terms of information hiding. I avoid writing functions with side-effects as much as possible, so the only communication of the called function with the caller function is through the arguments and

Re: [R] colnames of a column

2008-06-19 Thread Wacek Kusnierczyk
Alfredo Alessandrini wrote: > Hi, > > With this data.frame: > > >> class(rwl) >> > [1] "data.frame" > > >> rwl >> > 0028002F 0028013F 0028032F > 1833 3.39 NA NA > 1834 3.09 NA NA > 1835 3.05 NA NA > 1836 3.31 NA NA >

Re: [R] Howto access V-base only column in a data frame

2008-06-19 Thread Rolf Turner
On 20/06/2008, at 4:07 PM, Moshe Olshansky wrote: If you know the value of k then you could do the following: goodNames <- paste("V",1:k,sep="") ind <- which(colnames(df) %in% goodNames) df[,ind] (where df is your dataframe). P.S. I won't be surprised if df[,goodNames] is all right too (have

[R] Programming Concepts and Philosophy

2008-06-19 Thread Murray Jorgensen
I am wondering if people on the list could recommend books that they have found helpful about programming concepts and style? I often find that students write R programs by copying existing code but could really benefit from the understanding of more general programming ideas. An example would

[R] kernel discriminant analysis with binary data

2008-06-19 Thread a.suarez
Hello all, I need a package for an kernel discriminant analysis with multivariate binary data. Thanks. a.suarez -- View this message in context: http://www.nabble.com/kernel-discriminant-analysis-with-binary-data-tp18021145p18021145.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Howto access V-base only column in a data frame

2008-06-19 Thread Moshe Olshansky
If you know the value of k then you could do the following: goodNames <- paste("V",1:k,sep="") ind <- which(colnames(df) %in% goodNames) df[,ind] (where df is your dataframe). P.S. I won't be surprised if df[,goodNames] is all right too (have not checked). --- On Fri, 20/6/08, Gundala Viswanath

[R] Howto access V-base only column in a data frame

2008-06-19 Thread Gundala Viswanath
Hi, Suppose I have the following data frame: V1 V2 V3 var 1 100 200 400 2.3 2 40.5 1.2 20.3 ... In this example the maximum V column is 3. In my code there the column number can be varied. My question is how can I access data frame from column V1 up to Vk (some "k" and excluding'var' column)

[R] Recommending number of clusters

2008-06-19 Thread Chua Siang Li
Hello there. I wanted to segment customers and is trying both kmeans and HCA method in R. As I don't know how many cluster is good for a set of data, in kmeans, I tried the code below and get a nice plot on number of cluster vs SSE. Looking at the slope between cluster number, I h

Re: [R] how to write symbol (nabla) in R graph

2008-06-19 Thread S Ellison
You can use the 'symbol' element in an expression. For example plot(1:5) text(2,3,expression(symbol("\xD1"))) S. >>> "Nuno Prista" <[EMAIL PROTECTED]> 06/19/08 9:55 PM >>> Dear colleagues, Can anyone of you tell me how to write a "nabla" symbol in an R graph? Thanks in advance, N

Re: [R] .Rd file exists in 'man' directory, but R CMD CHECK results in warning

2008-06-19 Thread Duncan Murdoch
On 19/06/2008 7:25 PM, dave gregovich wrote: Hello, My package has passed all the R CMD CHECK steps except one. There is an object which I placed in a sysdata.rda file (located in the 'R' directory of the source package). Even though users have no need to access this object, which is a character

Re: [R] Pointwise Confidence Bounds on Logistic Regression

2008-06-19 Thread Bryan Hanson
Thanks so much to all who offered assistance. I have to say it would have taken me a long time to figure this out, so I am most grateful. Plus, studying your examples greatly improves my understanding. As a follow up, the fit process gives the following error: Warning messages: 1: In eval(expr,

Re: [R] Advanced Filtering problem

2008-06-19 Thread hadley wickham
Hi Tyler, > I've attached 100 rows of a data frame I am working with. > I have one factor, id, with 27 levels. There are two columns of reference > data, x and y (UTM coordinates), one column "date" in POSIXct format, and > one column "diff" in times format (chron package). > > What I am trying t

Re: [R] Draw curve for histogram

2008-06-19 Thread Anh Tran
Thanks. I think I've got it. However, the density is plotted, not the frequency. Is there a way to convert the density back to frequency. Thanks a bunch. Anh Tran On Thu, Jun 19, 2008 at 3:33 PM, milton ruser <[EMAIL PROTECTED]> wrote: > Hi Anh, > > How about the reply by Dimitris? > > Kind rega

[R] .Rd file exists in 'man' directory, but R CMD CHECK results in warning

2008-06-19 Thread dave gregovich
Hello, My package has passed all the R CMD CHECK steps except one. There is an object which I placed in a sysdata.rda file (located in the 'R' directory of the source package). Even though users have no need to access this object, which is a character vector of parameters fed to Fortran code, R CMD

Re: [R] colnames of a column

2008-06-19 Thread Peter Alspach
Alfredo > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Alfredo > Alessandrini > Sent: Friday, 20 June 2008 10:56 a.m. > To: r-help@r-project.org > Subject: [R] colnames of a column > > Hi, > > With this data.frame: > > > class(rwl) > [1] "data

Re: [R] colnames of a column

2008-06-19 Thread Henrique Dallazuanna
Try names(rwl[1]) 2008/6/19, Alfredo Alessandrini <[EMAIL PROTECTED]>: > Hi, > > With this data.frame: > >> class(rwl) > [1] "data.frame" > >>rwl > 0028002F 0028013F 0028032F > 1833 3.39 NA NA > 1834 3.09 NA NA > 1835 3.05 NA NA > 1836 3.31

Re: [R] Advanced Filtering problem

2008-06-19 Thread milton ruser
Hi Tyler, I don´t know if I understood well. Try this. Case not work I try again and again :-) df<-read.csv("http://www.nabble.com/file/p18018170/subdata.csv";) df.min.diff<-aggregate(df["diff"], df[c("day")], min) df.subset<-subset(df, paste(df$day, df$diff) %in% paste(df.min.diff$day, df.min.

[R] colnames of a column

2008-06-19 Thread Alfredo Alessandrini
Hi, With this data.frame: > class(rwl) [1] "data.frame" >rwl 0028002F 0028013F 0028032F 1833 3.39 NA NA 1834 3.09 NA NA 1835 3.05 NA NA 1836 3.31 NA NA 1837 2.26 NA NA > colnames(rwl) [1] "0028002F" "0028013F" "00

Re: [R] Draw curve for histogram

2008-06-19 Thread milton ruser
Hi Anh, How about the reply by Dimitris? Kind regards, miltinho Brazil -- Forwarded message -- From: Dimitris Rizopoulos <[EMAIL PROTECTED]> Date: Jun 16, 2008 4:05 AM Subject: Re: [R] Superimposing Line over Histogram in Density Plot To: Gundala Viswanath <[EMAIL PROTECTED]> Cc

[R] error related to approxfun in R 2.7.0

2008-06-19 Thread Karl Marx
I'm testing R version 2.7.0 on windows and there seems to be a compatibility issue with objects that were created by "approxfun" in older versions. As long as the objects were created in version 2.7.0 things work ok, but calling the interpolated functions from R version 2.0.1 causes this error: Er

Re: [R] Pattern Matching Replacement

2008-06-19 Thread Hans-Jörg Bibiko
On 19.06.2008, at 20:17, ppatel3026 wrote: I would like to replace "\r\n" with "" in a character string, where "\r\n" exists only between < and >, how could I do that? Initial: characterString = "\r\n" Result: characterString = "\r\nXML>" Tried with sub(below) but it only replaces the f

[R] print one character on several lines

2008-06-19 Thread Hua Li
Hi All, I'm wondering how I can print one large/long character on several lines so that the output will not overflow a page. Setting fill be TRUE or even numbers does not help. An example is below: ipuFile <- file("input.txt", "w") cat("This is a very long character and I want to pr

Re: [R] Draw curve for histogram

2008-06-19 Thread Henrique Dallazuanna
See ?density On Thu, Jun 19, 2008 at 6:16 PM, Anh Tran <[EMAIL PROTECTED]> wrote: > Hi all, > What parameter should I feed to the hist function to draw a line, not bar > graph for a histogram? Smoothed line would be great too. > I've looked at curve() for normal distribution but it's not what I n

[R] Draw curve for histogram

2008-06-19 Thread Anh Tran
Hi all, What parameter should I feed to the hist function to draw a line, not bar graph for a histogram? Smoothed line would be great too. I've looked at curve() for normal distribution but it's not what I need. I need some curve on top of the histogram (fit to the actual data). Just as a way to il

Re: [R] Installation Error with Bioconductor on R

2008-06-19 Thread Martin Morgan
Hi AA Ask on the bioconductor mailing list, following the 'mailing lists' link on the front page http://bioconductor.org and... A A wrote: Hi, I am trying to install Bioconductor onto R version 2.7.0 for Windows. I installed R, then followed the instructions on http://www.bioconductor.org

[R] Advanced Filtering problem

2008-06-19 Thread T.D.Rudolph
http://www.nabble.com/file/p18018170/subdata.csv subdata.csv I've attached 100 rows of a data frame I am working with. I have one factor, id, with 27 levels. There are two columns of reference data, x and y (UTM coordinates), one column "date" in POSIXct format, and one column "diff" in times

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Peter Dalgaard
Thompson, David (MNR) wrote: -Original Message- From: Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: June 19, 2008 04:23 PM To: Thompson, David (MNR) Cc: r-help@r-project.org Subject: Re: [R] YAPMQ - Yet Another PlotMath Question Thompson, David (MNR) wrote: Hello, I'm having tr

[R] how to write symbol (nabla) in R graph

2008-06-19 Thread Nuno Prista
Dear colleagues, Can anyone of you tell me how to write a "nabla" symbol in an R graph? Thanks in advance, Nuno __ Centro de Oceanografia - IO-FCUL, Portugal Center for Quantitative Fisheries Ecology - ODU, USA [[altern

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Thompson, David (MNR)
>-Original Message- >From: Katharine Mullen [mailto:[EMAIL PROTECTED] >Sent: June 19, 2008 04:26 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] YAPMQ - Yet Another PlotMath Question > >by example: > >slope <- 45 >plot(1:10) >text(2, 7, labels = expression(45~degr

Re: [R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread hadley wickham
> Note that the R-project page (www.r-project.org) > and CRAN are two "things", albeit closely related. > CRAN is for "DOWNLOAD"ing, including free contributed docs. > So that is the main reason, "contrib.docs" are not there in the > www.r-project.org sidebar. Why does there need to be two site

Re: [R] PCA analysis

2008-06-19 Thread Daniel Malter
Hi Mona, I cannot get it done with the princomp and the biplot commands either (maybe somebody can), but there are always many ways to Rome. This is how you can do it (below). However, the label=rep... below assumes that your values are in order, i.e. that you really want to plot the first fifty ro

[R] Installation Error with Bioconductor on R

2008-06-19 Thread A A
Hi, I am trying to install Bioconductor onto R version 2.7.0 for Windows. I installed R, then followed the instructions on http://www.bioconductor.org/download, which state that you should type the following: source("http://bioconductor.org/biocLite.R";) biocLite() When I do that, I get the f

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Thompson, David (MNR)
>-Original Message- >From: Peter Dalgaard [mailto:[EMAIL PROTECTED] >Sent: June 19, 2008 04:23 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] YAPMQ - Yet Another PlotMath Question > >Thompson, David (MNR) wrote: >> Hello, >> >> I'm having trouble finding (remembe

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Katharine Mullen
by example: slope <- 45 plot(1:10) text(2, 7, labels = expression(45~degree)) ; text(2, 5, labels = substitute(paste(slope * degree), list(slope=45))) text(2, 3, labels = substitute(paste(lambda * " = " * mt * " (nm)"), list(mt = 33))) On Thu, 19 Jun 2008, Thompson, David (MNR) wrote: > H

Re: [R] ANOVA error

2008-06-19 Thread Peter Alspach
Dani > I have a dataframe named myMatrix with the structure If it really is a dataframe, why is it called myMatrix :-) I guess you actually have a factor matrix. From the message below, Cr would appear to be a factor. There are some fundamental distinctions in R (such as between a matrix and

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Peter Dalgaard
Thompson, David (MNR) wrote: Hello, I'm having trouble finding (remembering) how to pass values into text functions in plots, as demonstrated by: slope <- 45 ; plot(1:10) ; text(2, 7, labels = expression(45~degree)) ; text(2, 5, labels = paste(bquote(.(slope)), expression(degree))) text(2,

Re: [R] contour plot - line passing through z values

2008-06-19 Thread Duncan Murdoch
On 6/19/2008 12:51 PM, Jehol wrote: Dear all, there is much in these forums about adding a line to a contour/filled.contour plot, but I haven't found hints for the following. I apologize in advance if I just missed the right one. I'm having a standard filled.contour plot to which I want to add a

[R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Thompson, David (MNR)
Hello, I'm having trouble finding (remembering) how to pass values into text functions in plots, as demonstrated by: slope <- 45 ; plot(1:10) ; text(2, 7, labels = expression(45~degree)) ; text(2, 5, labels = paste(bquote(.(slope)), expression(degree))) Thanx, DaveT.

Re: [R] unable to install for r-base dependency?

2008-06-19 Thread Michael Rutter
Taka, My appogizes. I didn't realize that cluster depends on the latest beta version of R. I have uploaded the latest version of R-base to the sevrers, but it will take a few hours for things to sync to all CRAN servers. In the meantime, you can download a version of r-cran-cluster here: http:

Re: [R] How can I execute a .R/script file

2008-06-19 Thread Daniel Folkinshteyn
source('yourscript.R') on 06/19/2008 03:11 PM [EMAIL PROTECTED] said the following: Dear R-Users, I've written a number of functions in a .R/script file. I would like to call those functions from another script file. How can I execute all the code in a script file so that the functions are av

[R] Regresions based on Empirical transformations and varying distributions

2008-06-19 Thread tolga . i . uzuner
Dear R-users, This is partially a R question and partially general econometrics. I have three time series which are somewhat "dissimilar": plotting their histograms indicates that they do not come from the same distribution, never mind a normal distribution. I wish to predict the first as a fu

Re: [R] highest eigenvalues of a matrix

2008-06-19 Thread baptiste Auguié
Thank you all for your interest in this. The ARPACK library looks like a very interesting option, I wish I had some experience in interfacing R with such libraries. I'll try to learn on a simple example first, and if successful I will try to adapt the igraphlib interface to provide the desi

Re: [R] The assign function in R

2008-06-19 Thread Applejus
Thanks all for your help! Peter Dalgaard wrote: > > Prof Brian Ripley wrote: >> For the record, frame=1 and where=1 are not the same thing (whereas >> frame=0 and where=0 are both the session database): assign() in S has >> both 'frame' and 'where' arguments. >> > Drats... I stand corrected.

Re: [R] How can I execute a .R/script file

2008-06-19 Thread Jorge Ivan Velez
Hi Tolga, See ?source HTH, Jorge On Thu, Jun 19, 2008 at 3:11 PM, <[EMAIL PROTECTED]> wrote: > Dear R-Users, > > I've written a number of functions in a .R/script file. I would like to > call those functions from another script file. How can I execute all the > code in a script file so that t

Re: [R] How can I execute a .R/script file

2008-06-19 Thread tolga . i . uzuner
Many thanks all, Tolga "Jorge Ivan Velez" <[EMAIL PROTECTED]> 19/06/2008 20:19 To [EMAIL PROTECTED] cc r-help@r-project.org Subject Re: [R] How can I execute a .R/script file Hi Tolga, See ?source HTH, Jorge On Thu, Jun 19, 2008 at 3:11 PM, <[EMAIL PROTECTED]> wrote: Dear R-Users,

Re: [R] How can I execute a .R/script file

2008-06-19 Thread Ramon Diaz-Uriarte
Dear Tolga, Check the help for "source" (?source). HTH, R. On Thu, Jun 19, 2008 at 9:11 PM, <[EMAIL PROTECTED]> wrote: > Dear R-Users, > > I've written a number of functions in a .R/script file. I would like to > call those functions from another script file. How can I execute all the > code

Re: [R] How can I execute a .R/script file

2008-06-19 Thread tolga . i . uzuner
Ah.. It is source() ...apologies for the waste of time, Tolga Tolga I Uzuner/JPMCHASE 19/06/2008 20:11 To r-help@r-project.org cc Subject How can I execute a .R/script file Dear R-Users, I've written a number of functions in a .R/script file. I would like to call those functions from

[R] How can I execute a .R/script file

2008-06-19 Thread tolga . i . uzuner
Dear R-Users, I've written a number of functions in a .R/script file. I would like to call those functions from another script file. How can I execute all the code in a script file so that the functions are available for use in my other script file ? I have tried help.search("script") and vari

Re: [R] combining two data frames (different question)

2008-06-19 Thread John Kane
This depends on the id column. If all the id's are the same and in the exact same order then look at ?cbind. If you have different numbers or different ids in the two id columns see ?merge --- On Tue, 6/17/08, calundergrad <[EMAIL PROTECTED]> wrote: > From: calundergrad <[EMAIL PROTECTED]> >

Re: [R] Pattern Matching Replacement

2008-06-19 Thread Gabor Grothendieck
On Thu, Jun 19, 2008 at 2:17 PM, ppatel3026 <[EMAIL PROTECTED]> wrote: > > I would like to replace "\r\n" with "" in a character string, where "\r\n" > exists only between < and >, how could I do that? > > Initial: > characterString = " id=\"F\r\n2\">\r\n" > > Result: > characterString = "\r\n" > >

[R] contour plot - line passing through z values

2008-06-19 Thread Jehol
Dear all, there is much in these forums about adding a line to a contour/filled.contour plot, but I haven't found hints for the following. I apologize in advance if I just missed the right one. I'm having a standard filled.contour plot to which I want to add a line passing through some specific z

Re: [R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread John Kane
--- On Thu, 6/19/08, Martin Maechler <[EMAIL PROTECTED]> wrote: > From: Martin Maechler <[EMAIL PROTECTED]> > Subject: Re: [R] R web site-Useability & finding varous bits of documentation > To: [EMAIL PROTECTED] > Cc: "R R-help" <[EMAIL PROTECTED]> > Received: Thursday, June 19, 2008, 12:17 PM >

Re: [R] unable to install for r-base dependency?

2008-06-19 Thread Vincent Goulet
Le jeu. 19 juin à 10:55, [EMAIL PROTECTED] a écrit : Hi, I have been trying to install R for Ubuntu linux. Strangely, I got the dependency error message below. Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This

Re: [R] How to change ${R_HOME}?

2008-06-19 Thread tkobayas
Hi, I am reinstalling R for Ubuntu Hardy using a CRAN mirror. I successfully installed R 2.6.2, but when I type 'R' in a terminal it says, [EMAIL PROTECTED]:~$ R .: 204: Can't open /usr/local/lib64/R/etc/ldpaths And it seems like my R is at /usr/lib64/' not /usr/local/lib64. So I am thinkin

Re: [R] PrettyR (describe)

2008-06-19 Thread Chuck Cleland
On 6/19/2008 1:54 PM, stephen sefick wrote: #is there a way to get NA in the table of descriptive statistics instead of the function stopping Thank you in advance Replace sd() with something like this: mysd <- function(x, na.rm=TRUE){ifelse(all(is.na(x)), NA, sd(x, na.rm=TRUE))} Or con

Re: [R] S4 pass-by-value work-around?

2008-06-19 Thread Henrik Bengtsson
Quick comment. Use an environment to hold your "fields" and then pass around the environment variable. Any modification to variables inside the environment done from anywhere (inside/outside functions) will be persistent. Then wrap this up in a class structure, overload, say, '$', '[[', '$<-', '

[R] Pattern Matching Replacement

2008-06-19 Thread ppatel3026
I would like to replace "\r\n" with "" in a character string, where "\r\n" exists only between < and >, how could I do that? Initial: characterString = "\r\n" Result: characterString = "\r\n" Tried with sub(below) but it only replaces the first instance and I am not sure how to pattern match s

Re: [R] Insert raster image into an R graphic

2008-06-19 Thread Tudor Bodea
Gabor: Thank you so much for your prompt reply. Tudor Quoting Gabor Grothendieck <[EMAIL PROTECTED]>: > There is some sample code here: > > http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:translucency > > On Mon, Jun 16, 2008 at 11:09 PM, Tudor Bodea <[EMAIL PROTECTED]> > wrote:

Re: [R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread John Kane
Again thanks Chuck but I doubt any newbie who has heard about R and wants to read some of the rather good documentation available is going to use that. What I am trying to point out is that the R site is not the most easilly navigated for a newbie. Think of it like visiting your local bank's

[R] PrettyR (describe)

2008-06-19 Thread stephen sefick
#is there a way to get NA in the table of descriptive statistics instead of the function stopping Thank you in advance #data x.f <- structure(list(Site = structure(c(9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L), .Label = c("BC", "HC",

Re: [R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread John Kane
Thanks Chuck but that does not actually answer my question. Those navbars do not take me directly to the "Contributed Documentation" nor "Publications related to R" They take me to Books or "R Documentation". I still do not see any what for a newbie to find their way from the main R page to

[R] create .exe file with R?

2008-06-19 Thread Hua Li
Dear all, I'm writing to check with you whether there is a way to create .exe file(or something like that) with R. Now working on creating a program to take inputs from users (with tcl/tk), I would appreciate any idea to make the program run on its own rather than every time having to run my so

Re: [R] highest eigenvalues of a matrix

2008-06-19 Thread Martin Maechler
> "KateM" == Katharine Mullen <[EMAIL PROTECTED]> > on Thu, 19 Jun 2008 11:50:22 +0200 (CEST) writes: KateM> On Thu, 19 Jun 2008, Simon Wood wrote: >> > >> > I happily use eigen() to compute the eigenvalues and >> eigenvectors of > a fairly large matrix (200x200, say),

Re: [R] S4 pass-by-value work-around?

2008-06-19 Thread Martin Morgan
Hi again Jeff... Jeffrey Spies <[EMAIL PROTECTED]> writes: > Thanks for the response, Martin. While the solutions offered update the > object appropriately, we wouldn't get the desired return value (a string > followed by the counter, "unique_1") when the methods are called. Do you > know a way

Re: [R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread Charles C. Berry
On Thu, 19 Jun 2008, Charles C. Berry wrote: On Thu, 19 Jun 2008, John Kane wrote: I was starting to write a note to a prospective R-user and came to the point of explaining how to get useful introductory information on R. After mentioning the Into and the FAQs I went on to try to explain

Re: [R] Create Matrix from Loop of Vectors, Sort It and Pick Top-K

2008-06-19 Thread Marc Schwartz
on 06/19/2008 09:59 AM Gundala Viswanath wrote: Hi, I have the following dataset (simplified for example). __DATA__ 300.35 200.25 104.30 22.00 31.12 89.99 444.50 22.10 43.00 22.10 200.55 66.77 Now from that I wish to do the following: 1. Compute variance of each row 2. Pick top-2 row with hi

Re: [R] Pointwise Confidence Bounds on Logistic Regression

2008-06-19 Thread Gavin Simpson
On Thu, 2008-06-19 at 10:42 -0400, Bryan Hanson wrote: > [I've ommitted some of the conversation so far...] > > > E.g. in a logistic model, with (say) eta = beta_0 + beta_1*x one may > > find, on the > > linear predictor scale, A and B (say) such that P(A <= eta <= B) = 0.95. > > > > Then P(expit

Re: [R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread Charles C. Berry
On Thu, 19 Jun 2008, John Kane wrote: I was starting to write a note to a prospective R-user and came to the point of explaining how to get useful introductory information on R. After mentioning the Into and the FAQs I went on to try to explain how to use a lot of the contributed information.

[R] Optim() violates constraints

2008-06-19 Thread Zornitsa Luleva
Hi, I am using the mle2 method of the package 'bbmle'. The method is calling as far as I understood it the optim method "L-BFGS-B" (this is the method I use). The latter one allows the user to impose box constraints on the variables, i.e. to give lower and upper bounds. It is important that the i

Re: [R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread Martin Maechler
> "JK" == John Kane <[EMAIL PROTECTED]> > on Thu, 19 Jun 2008 06:50:18 -0700 (PDT) writes: JK> I was starting to write a note to a prospective R-user JK> and came to the point of explaining how to get useful JK> introductory information on R. After mentioning the JK> I

Re: [R] S4 pass-by-value work-around?

2008-06-19 Thread Jeffrey Spies
Thanks for the response, Martin. While the solutions offered update the object appropriately, we wouldn't get the desired return value (a string followed by the counter, "unique_1") when the methods are called. Do you know a way of dealing with this? Jeff. Martin Morgan wrote: > > Hi Jeff --

Re: [R] constrOptim with method = "L-BFGS-B"

2008-06-19 Thread Thomas Lumley
On Tue, 17 Jun 2008, lhaba wrote: Hi, i need to minimize a quadratic function with boundary condidtions and one equality condition. In order to do that i converted the equality constraint into 2 inequality constaints You can't do that with constrOptim. constrOptim requires the interior of the

Re: [R] how to extract object from stats test output (cor.test)?

2008-06-19 Thread Duncan Murdoch
On 6/19/2008 11:01 AM, Patrick Ayscue wrote: Hello, Is there a way to extract output objects from a stats test without viewing the entire output? I am trying to do so in the following: define a vector of length j for( i in 1: length (vector)) { vector[i] = cor.test (datavector1, datavector2[i

Re: [R] how to extract object from stats test output (cor.test)?

2008-06-19 Thread Jorge Ivan Velez
Dear Patrick, Assuming that datavector1 is the first column of your data set, you can try: # Data set set.seed(123) y=matrix(rnorm(100*6),ncol=6) rownames(y)=1:100 colnames(y)=c('datavector1',paste('X',1:5,sep="")) y[1:10,] # Correlations RES=apply(y[,-1],2,function(y,x) cor.test(x,y,method="spe

Re: [R] S4 pass-by-value work-around?

2008-06-19 Thread Martin Morgan
Hi Jeff -- two different scenarios are to overwrite the current object, along the lines of y <- uniquify(y) where uniquify is a method like createUniqueName but returns the (modified) instance rather than unique name setMethod('uniquify', 'MyMatrix', function(x) { [EMAIL PROTECTED] <- # som

Re: [R] How can I shade the background area of a zoo time series object between specific dates?

2008-06-19 Thread Gabor Grothendieck
See ?rect library(zoo) d1 <- as.Date("2007-04-12") d2 <- as.Date("2008-05-14") plot(SP500, type = "n") rect(d1, par("usr")[3], d2, par("usr")[4], col = "red", border = 0) lines(SP500) Also, there is an example using the lattice/grid-based xyplot.zoo in ?xyplot.zoo On Thu, Jun 19, 2008 at 10:48 A

Re: [R] how to extract object from stats test output (cor.test)?

2008-06-19 Thread Abhijit Dasgupta
First of all, you need to store as a list not a vector if you;re storing the entire output. Otherwise, you can just store, for example, cor.test(...)$p.value On Thu, 19 Jun 2008 11:01:42 -0400 "Patrick Ayscue" <[EMAIL PROTECTED]> wrote: > Hello, > > Is there a way to extract output objects fr

Re: [R] Comparison between R and MATLAB

2008-06-19 Thread Spencer Graves
The short answer on comparing R and Matlab is that it depends on your benchmark and which church you happen to frequent. Some people swear that Matlab is superior, but I haven't seen the evidence for that. The benchmarks that come closer to being transparent are more equivocal, as far as

[R] how to extract object from stats test output (cor.test)?

2008-06-19 Thread Patrick Ayscue
Hello, Is there a way to extract output objects from a stats test without viewing the entire output? I am trying to do so in the following: define a vector of length j for( i in 1: length (vector)) { vector[i] = cor.test (datavector1, datavector2[i], method=("spearman")) } I would like the rep

Re: [R] Create Matrix from Loop of Vectors, Sort It and Pick Top-K

2008-06-19 Thread Jorge Ivan Velez
Dear Gundala, Try this: # Data set DF=read.table(textConnection("300.35 200.25 104.30 22.00 31.12 89.99 444.50 22.10 43.00 22.10 200.55 66.77"),header=FALSE,sep="") # Variances VAR=apply(DF,1,var) # Order pos=order(VAR) # Print VAR and pos VAR pos # ordered VAR VAR[pos] # top-2 highest VAR

Re: [R] unable to install for r-base dependency?

2008-06-19 Thread Dirk Eddelbuettel
On Thu, Jun 19, 2008 at 10:55:01AM -0400, [EMAIL PROTECTED] wrote: > Hi, > > I have been trying to install R for Ubuntu linux. Strangely, I got the > dependency error message below. > > Reading package lists... Done > Building dependency tree > Reading state information... Done > Some packages c

[R] Create Matrix from Loop of Vectors, Sort It and Pick Top-K

2008-06-19 Thread Gundala Viswanath
Hi, I have the following dataset (simplified for example). __DATA__ 300.35 200.25 104.30 22.00 31.12 89.99 444.50 22.10 43.00 22.10 200.55 66.77 Now from that I wish to do the following: 1. Compute variance of each row 2. Pick top-2 row with highest variance 3. Store those selected rows for fu

Re: [R] unable to install for r-base dependency?

2008-06-19 Thread tkobayas
Hi, I have been trying to install R for Ubuntu linux. Strangely, I got the dependency error message below. Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situatio

[R] How can I shade the background area of a zoo time series object between specific dates?

2008-06-19 Thread Vorlow Constantinos
Dear list members, How can I shade the background area of a zoo time series object between specific dates? eg. library(tseries) library(zoo) SP500<-get.hist.quote("^GSPC", start = "1990-01-01", quote = "Close") plot(SP500) How can I produce the same plot but with a (say) red

[R] add counter to file name + dir.create

2008-06-19 Thread Yasin Hajizadeh
Hi all I have 2 loops with 2 counters, say outer loop counter is X and inner loop counter is Y. In outer loop a data file with known number of columns and unknown number of rows is generated in each script iteration. What inner loop should do is to read this file line by line and genera

Re: [R] Pointwise Confidence Bounds on Logistic Regression

2008-06-19 Thread Bryan Hanson
[I've ommitted some of the conversation so far...] > E.g. in a logistic model, with (say) eta = beta_0 + beta_1*x one may > find, on the > linear predictor scale, A and B (say) such that P(A <= eta <= B) = 0.95. > > Then P(expit(A) <= expit(eta) <= expit(B)) = 0.95, which is exactly > what is wan

Re: [R] help with manipulating data frames (survey analysis)

2008-06-19 Thread John Kane
“Notes on the use of R for psychology experiments and questionnaires” by Jonathan Baron and Yuelin Li on the R website. --- On Wed, 6/18/08, Marvin Lists <[EMAIL PROTECTED]> wrote: > From: Marvin Lists <[EMAIL PROTECTED]> > Subject: [R] help with manipulating data frames (survey analysis) > T

Re: [R] highest eigenvalues of a matrix

2008-06-19 Thread Gabor Csardi
Baptiste, the igraph ARPACK interface is quite experimental, and igraph includes only the ARPACK files (converted to C) that it needs to calculate some graph measures on sparse graphs. Btw. the development version of igraph is a bit better in this respect, I can send you a link to the developme

Re: [R] highest eigenvalues of a matrix

2008-06-19 Thread baptiste Auguié
Dear all, Thank you for the suggestions and pointers. It looks like I'll need to do some interface with Fortran/C code. The igraph package seems to provide an interface with ARPACK, albeit not with the options I need, so it could be a good starting point. Best regards, baptiste On 19 J

Re: [R] Any simple way to subset a vector of strings that do contain a particular substring ?

2008-06-19 Thread Gabor Grothendieck
regexpr("ba", strings) On Thu, Jun 19, 2008 at 1:18 AM, Daren Tan <[EMAIL PROTECTED]> wrote: > > > For example, > > strings <- c("", "","ccba"). > > How to get "", "" that do not contain "ba" ? Here are three ways: > strings[regexpr("ba", strings) < 0] [1] "" "" > setdif

[R] R web site-Useability & finding varous bits of documentation

2008-06-19 Thread John Kane
I was starting to write a note to a prospective R-user and came to the point of explaining how to get useful introductory information on R. After mentioning the Into and the FAQs I went on to try to explain how to use a lot of the contributed information. However I realised that there seems t

Re: [R] Controlling the length of line with abline(lm())

2008-06-19 Thread hadley wickham
On Wed, Jun 18, 2008 at 9:09 PM, Tariq Perwez <[EMAIL PROTECTED]> wrote: > Hi > I just realized that when I use linear regression to draw a line through my > data points with something like the following: > > abline(lm(y ~ x)) > > > the length of the line is infinite, i.e., the line goes beyond the

Re: [R] Histogram inset into another histogram

2008-06-19 Thread Victor Homar
Hi Paul, Thanks for the answer. I temporarily did it with the subplot function from the TeachingDemos package but I like this version much better. Best, Victor. Paul Hiemstra wrote: Victor Homar wrote: Dear R users and helpers, I'm trying to find an example of a histogram plot as an inset

[R] Optim() violates constraints

2008-06-19 Thread Zornitsa Luleva
Hi, I am using the mle2 method of the package 'bbmle'. The method is calling as far as I understood it the optim method "L-BFGS-B" (this is the method I use). The latter one allows the user to impose box constraints on the variables, i.e. to give lower and upper bounds. It is important that the in

Re: [R] Comparison between R and MATLAB

2008-06-19 Thread stephen sefick
This discussion has already occurred- to my knowledge at least once. I would suggest searching the archived list, and see what you get. If you still have questions after you have a look then fire a couple of specifics, but speaking for myself I don't know anything about matlab only S (and even t

  1   2   >