[R] Cross build Makefile

2004-06-20 Thread Iago Mosqueira
Hello, I am trying to use Yan and Rossini's Makefile for cross building Windows versions of R packages in Linux with R 1.9.0. When compiling R with the mingw tools I get an error about expm1 being undeclared when first found at src/main/arithmetic.c:1019 If I fiddle a bit with it later on I also

RE: [R] hidden markov models in R?

2004-06-20 Thread Ingmar Visser
Hi Cezar, Download and install the repeated package by Jim Lindsey and type ?hidden bye, ingmar Hi, friends! Has R estimation (library, for example) to do estimation in HMM? Thanks in advance, Cezar Freitas Estatistico - Comissao Permanente para os

Re: [R] Greater than 1 or less than 1?

2004-06-20 Thread Ray Brownrigg
> Date: Sun, 20 Jun 2004 18:32:46 -0400 > From: "Zhen Chen" <[EMAIL PROTECTED]> > > I have problem evaluating the expression h = exp(x)/(exp(exp(x))-1) for > large negative x. This expression is actually the probability > that y = 1 when y is a Poisson random variable truncated at 0, hence > mus

Re: [R] Greater than 1 or less than 1?

2004-06-20 Thread Thomas Lumley
On Sun, 20 Jun 2004, Zhen Chen wrote: > I have problem evaluating the expression h = exp(x)/(exp(exp(x))-1) for > large negative x. This expression is actually the probability > that y = 1 when y is a Poisson random variable truncated at 0, hence > must satisfy 0 <= h <= 1. However, when You wou

Re: [R] Greater than 1 or less than 1?

2004-06-20 Thread Peter Dalgaard
"Zhen Chen" <[EMAIL PROTECTED]> writes: > I have problem evaluating the expression h = exp(x)/(exp(exp(x))-1) > for large negative x. This expression is actually the probability > that y = 1 when y is a Poisson random variable truncated at 0, hence > must satisfy 0 <= h <= 1. However, when > x < -

Re: [R] Fw: Evaluating strings as variables

2004-06-20 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: > > sapply(colors, get) > > > > or? > unlist(mget(colors, envir = as.environment(-1), inherits = TRUE)) Ah, yes, forgot about mget. Doesn't seem to make things much cleaner though... (although get() also needs a bit more care about environments). -- O__ Pete

[R] Greater than 1 or less than 1?

2004-06-20 Thread Zhen Chen
I have problem evaluating the expression h = exp(x)/(exp(exp(x))-1) for large negative x. This expression is actually the probability that y = 1 when y is a Poisson random variable truncated at 0, hence must satisfy 0 <= h <= 1. However, when x < -18, I may get an h value that is larger than 1 w

RE: [R] Another NEWBIE

2004-06-20 Thread John Fox
Dear Frank, First, thank you for your kind remarks about the Rcmdr package. Please note that the Rcmdr package is meant to be a basic statistics GUI for R, to be used, for example, in an introductory statistics course. It covers only a very small fraction of what's available in R. Almost all of

Re: [R] Sweave and echoing R comments

2004-06-20 Thread Frank E Harrell Jr
Charles H. Franklin wrote: Is there any way to echo comments from an R source file into an SWeave->LaTeX document? Example: # Npop is population total # Npoph0..Npoph2 are stratum totals # Npoph is vector of stratum totals Npop<-sum(to2000) Npoph0<-sum(to2000[bg==0]) Npoph1<-sum(to2000[bg==1]) Np

Re: [R] Fw: Evaluating strings as variables

2004-06-20 Thread Matthias . Kohl
> "Robin Gruna" <[EMAIL PROTECTED]> writes: > >> I have the following problem: I have a list as follows, >> >> > values <- list(red = 1, yellow = 2, blue = 3) >> >> > values >> $red >> [1] 1 >> >> $yellow >> [1] 2 >> >> $blue >> [1] 3 >> >> There is also a vector containing the diffrent "colors" as

Re: [R] Another NEWBIE

2004-06-20 Thread F.Kalder
Hello, And thanks again for your answers, perspectives and more... So, as I understood, R can (nearly) do anything. So, also because it's free, it is worth a try ;-). I then next will start with reading some introductory texts. And, wow, I'm quite 'overloaded', because there is so much stuff ava

Re: [R] regarding saving R graphis images directly to directory

2004-06-20 Thread Deepayan Sarkar
On Sunday 20 June 2004 15:15, SAURIN wrote: > Dear R, > > I am student at University of new haven, CT.I am trying to run my R > scripts where I don't have X11() authentication to my account. I run > those R scripts and when I generate any graphics I get error and it > comes out from system. > > if

Re: [R] Fw: Evaluating strings as variables

2004-06-20 Thread Peter Dalgaard
"Robin Gruna" <[EMAIL PROTECTED]> writes: > I have the following problem: I have a list as follows, > > > values <- list(red = 1, yellow = 2, blue = 3) > > > values > $red > [1] 1 > > $yellow > [1] 2 > > $blue > [1] 3 > > There is also a vector containing the diffrent "colors" as character st

[R] Fw: Evaluating strings as variables

2004-06-20 Thread Robin Gruna
- Original Message - From: Robin Gruna To: [EMAIL PROTECTED] Sent: Sunday, June 20, 2004 5:42 PM Subject: Evaluating strings as variables Hello, I have the following problem: I have a list as follows, > values <- list(red = 1, yellow = 2, blue = 3) > values $red [1] 1 $yellow [1] 2

[R] regarding saving R graphis images directly to directory

2004-06-20 Thread SAURIN
Dear R, I am student at University of new haven, CT.I am trying to run my R scripts where I don't have X11() authentication to my account. I run those R scripts and when I generate any graphics I get error and it comes out from system. if possible , please let me know how can i run R scripts .

Re: [R] Html help does not work in Mac OSX 10.3.4

2004-06-20 Thread Ulises Mora Alvarez
Hello: You are damn right! I haven't noticed because I rarely use the html help. I will be working on. I'll let you know. Regards. On Fri, 18 Jun 2004, Emilio A. Laca wrote: > I recently upgraded from R 1.8 to 1.9. I removed 1.8 following the > instructions. Html help has not worked since.

[R] problem locfit

2004-06-20 Thread fatima bouharaoui
I have a problem with the use of locfit with censured data, when I carry out locfit by: fitbmt<-locfit(~recur,data=BMTAGE11,cens=df.status,family="hazard",alpha=0.5) it does not give me any message, but if I want to obtain the graph or even if I ask for (fitbmt) made it gives me the following m

[R] Sweave and echoing R comments

2004-06-20 Thread Charles H. Franklin
Is there any way to echo comments from an R source file into an SWeave->LaTeX document? Example: # Npop is population total # Npoph0..Npoph2 are stratum totals # Npoph is vector of stratum totals Npop<-sum(to2000) Npoph0<-sum(to2000[bg==0]) Npoph1<-sum(to2000[bg==1]) Npoph2<-sum(to2000[bg==2]) Np

RE: [R] A way to list only variables or functions?

2004-06-20 Thread Gabor Grothendieck
Here they are again modified to remove that bug: ls.funs <- function(env=sys.frame(-1))unlist(lapply(ls(env=env),function(x)if(is.function(get(x,env=env)))x)) ls.var <- function(env=sys.frame(-1))unlist(lapply(ls(env=env),function(x)if(!is.function(get(x,env=env)))x)) Date: Sun, 20 Jun

Re: [R] Another NEWBIE

2004-06-20 Thread Frank E Harrell Jr
Charles and Kimberly Maner wrote: Hi Frank. I am (somewhat) new to R as well, but almost a 10 yr SAS veteran. I work for a very large US Bank and have spent a considerable part of my career in Corp Mktg leveraging data for, arguably, data mining, next purchase, attrition, balance diminishment and

Re: [R] if syntax

2004-06-20 Thread Dirk Eddelbuettel
On Sun, Jun 20, 2004 at 09:00:39AM -0700, [EMAIL PROTECTED] wrote: > I wanted to look up the internal R documentation for if via "?if", but > this does not work. making the latter work would be a good idea. FYI, it also works inside of (X)Emacs where the (highly recommend) ESS mode is kind enoug

Re: [R] Another NEWBIE

2004-06-20 Thread Charles and Kimberly Maner
Hi Frank. I am (somewhat) new to R as well, but almost a 10 yr SAS veteran. I work for a very large US Bank and have spent a considerable part of my career in Corp Mktg leveraging data for, arguably, data mining, next purchase, attrition, balance diminishment and the like. I am now managing an O

[R] hidden markov models in R?

2004-06-20 Thread Cezar Augusto de Freitas Anselmo
Hi, friends! Has R estimation (library, for example) to do estimation in HMM? Thanks in advance, Cezar Freitas Estatistico - Comissao Permanente para os Vestibulares / UNICAMP Probabilidade e Estatistica Aplicadas - IME / USP | IMECC / UNICAMP Campinas |

Re: [R] if syntax

2004-06-20 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: I ran into an interesting oddity of R, if (0) { print(1); } else { print(2); } In both cases the ";" is superflously . If if(){}else{} is within an expression (e.g. a function's body), both ways work. Do you really want to use it outside a function's body? If so

Re: [R] if syntax

2004-06-20 Thread Matthias Burger
try ?"if" Best, Matthias [EMAIL PROTECTED] wrote: I ran into an interesting oddity of R, if (0) { print(1); } else { print(2); } is a syntax error, while if (0) { print(1); } else { print(2); } or if (0) { print(1); } else { print(2); } is not. I presume it has to do with the

Re: [R] if syntax

2004-06-20 Thread Adaikalavan Ramasamy
This has been discussed several times on this list. Note that line 2 of paragraph 2 of help("if") says the following : " In particular, you should not have a newline between '}' and 'else' to avoid a syntax error in entering a 'if ... else' construct at the keyboard or via 'source'. " On Sun, 20

RE: [R] A way to list only variables or functions?

2004-06-20 Thread Prof Brian Ripley
On Sun, 20 Jun 2004, Shin, Daehyok wrote: > Neat! Thanks. Note that these are not correct, as the get is not done from the correct environment. The function ls.str I pointed you to is correct. > How about incorporating this support into standard commands, ls() or > objects()? Well, there alre

[R] if syntax

2004-06-20 Thread ivo_welch-Rstat
I ran into an interesting oddity of R, if (0) { print(1); } else { print(2); } is a syntax error, while if (0) { print(1); } else { print(2); } or if (0) { print(1); } else { print(2); } is not. I presume it has to do with the duality of the newline functioning as an end of com

RE: [R] A way to list only variables or functions?

2004-06-20 Thread Shin, Daehyok
Interesting, but it seems too complex. In my opinion, just listing functions or non-functions meets my need. Anyway, thanks. Daehyok Shin (Peter) > -Original Message- > From: S?en Merser [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 20, 2004 AM 10:51 > To: Shin > Subject: Re: [R] A way t

RE: [R] A way to list only variables or functions?

2004-06-20 Thread Shin, Daehyok
Neat! Thanks. How about incorporating this support into standard commands, ls() or objects()? Daehyok Shin (Peter) > -Original Message- > From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 20, 2004 AM 10:06 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [R]

[R] Anyone out there have the XLF Fortran compiler for OS X?

2004-06-20 Thread David L. Van Brunt, Ph.D.
I have code that will crash R every time on an OS X machine, but runs fine on other platforms. The developer I've been working with suspects it's a compiler issue, but I only have the same ones he does (g77). Obviously, the way to test this would be to compile R using another compiler. XLF is t

[R] [MailServer Notification] To External Sender: a virus was found a nd action taken.

2004-06-20 Thread Systemaufsicht
ScanMail for Microsoft Exchange took action on the message. The message details were: Sender = [EMAIL PROTECTED] Recipient(s) = [EMAIL PROTECTED]; Subject = i know your document! Scanning time = 06/20/2004 16:35:42 Engine/Pattern = 7.000-1004/1.909.00 Action taken on message: The attachment more

RE: [R] A way to list only variables or functions?

2004-06-20 Thread Gabor Grothendieck
These two functions will list the functions and variables respectively: ls.funs <- function(env=sys.frame(-1))unlist(lapply(ls(env=env),function(x)if(is.function(get(x)))x)) ls.vars <- function(env=sys.frame(-1))unlist(lapply(ls(env=env),function(x)if(!is.function(get(x)))x)) To use: ls.fu

Re: [R] Constrained non-linear mixed models

2004-06-20 Thread Spencer Graves
WHY THIS FUNCTIONAL FORM? If this were my problem, I would first want to know why we needed this particular functional form and why (b*var3+a) and (b*var4+a) had to be between 0 and 1. When I see things like this, my first impulse is that these may only be approximations to something els

[R] Constrained non-linear mixed models

2004-06-20 Thread Hwange Project
Dear r-helpers, does anyone knows how to constrain the value of parameters in a non-linear mixed model: I've got something like that: nlme(log(response)~z+y*log(var1)+x*log(var2)+log((b*var3+a)/(b*var4+a)^x) where 0mailto:[EMAIL PROTECTED]> __ [EMAIL PRO

Re: [R] A way to list only variables or functions?

2004-06-20 Thread Prof Brian Ripley
On Sat, 19 Jun 2004, Shin wrote: > I am curious if there is any way to list only variables or functions in > current environment, rather than listing all objects? Thanks. Not really. What you can do is list the objects and then get the objects and look at the modes, as ls.str does. That could