[Rd] Phonetic symbols (IPA) in R graphics

2006-12-13 Thread Giampiero Salvi
Hi all, I would like to add phonetic symbols in my figures. Usually I typeset my documents in LaTeX and I use the tipa [1] package to get International Phonetic Alphabet (IPA) fonts. So, my problem would be solved if I could insert LaTeX commands in the text() function (I guess at least). I would

Re: [Rd] Problem with tuned Rblas from CRAN with R-2.4.0

2006-12-13 Thread apjaworski
I just ran the example on a Win2000/P4 BLAS DLL system. It works fine on 2.4.1 beta (2006-12-10 r40146) as well as 2.5.0 Under development (unstable) (2006-12-10 r40146). I have had the same DLL file for a couple of years now (downloaded from the Wisconsin CRAN if I remember correctly) but occasi

Re: [Rd] Phonetic symbols (IPA) in R graphics

2006-12-13 Thread Greg Snow
If all else fails (and hopefully someone who knows more about fonts and such can give you a better suggestion so you don't even have to try this) then look at the last example for the subplot function in the TeachingDemos package. This shows how you can insert images into a plot, you could create

[Rd] capturing value of C or Fortran function

2006-12-13 Thread Harris A. Jaffee
Re: src/main/dotcode.c:do_dotCode() The value, if there is one, of a function called by .C or .Fortran is not captured, so one needs a wrapper. To avoid that, the user would have to declare that there is a value, specify its type, and supply an R variable to hold the value. Presumably, all of th

Re: [Rd] data frame subset patch, take 2

2006-12-13 Thread Tony Plate
Martin Maechler wrote: > [snip] > Note however that some of these changes are backward > incompatible. I do hope that the changes gaining efficiency > for such large data frames are worth some adaption of > current/old R source code.. > > Feedback on this topic is very welcome! Martin, my f

Re: [Rd] Problem with tuned Rblas from CRAN with R-2.4.0

2006-12-13 Thread Daniel Nordlund
Thanks to Uwe Ligges and Andy Jaworski for their responses. I thought the Rblas I was using was from CRAN master, and I when I encountered the problem originally, I downloaded a new copy from CRAN master. However, I must have misplaced it on download and used an old copy. Long story short, th

Re: [Rd] data frame subset patch, take 2

2006-12-13 Thread Jason Barnhart
I think the efficiency gain is worthwhile. Thx. -jason - Original Message - From: "Martin Maechler" <[EMAIL PROTECTED]> To: "Marcus G. Daniels" <[EMAIL PROTECTED]> Cc: ; "Vladimir Dergachev" <[EMAIL PROTECTED]> Sent: Tuesday, December 12, 2006 10:08 AM Subject: Re: [Rd] data frame subset

Re: [Rd] data frame subset patch, take 2

2006-12-13 Thread Vladimir Dergachev
On Wednesday 13 December 2006 6:01 am, Martin Maechler wrote: > > - Vladimir, have you verified your 'take2' against recent versions > of R-devel? Yes. > > - If they still work, could you re-post them to R-devel, this > time using a proper MIME type, > i.e. most probably one of > appl

Re: [Rd] data frame subset patch, take 2

2006-12-13 Thread Marcus G. Daniels
Vladimir Dergachev wrote: > 2. It would be nice to have true hashed arrays in R (i.e. O(1) access > times). So far I have used named lists for this, but they are O(n): > new.env(hash=TRUE) with get/assign/exists works ok. But I suspect its just too easy to use named lists because it is e

Re: [Rd] Phonetic symbols (IPA) in R graphics

2006-12-13 Thread Paul Murrell
Hi Giampiero Salvi wrote: > Hi all, > I would like to add phonetic symbols in my figures. Usually I typeset > my documents in LaTeX and I use the tipa [1] package to get > International Phonetic Alphabet (IPA) fonts. So, my problem would be > solved if I could insert LaTeX commands in the text()

Re: [Rd] capturing value of C or Fortran function

2006-12-13 Thread Hin-Tak Leung
Well, fortran subroutines don't really have return values (versus fortran functions, which do - as far as I know that's the only difference between fortran subroutines and functions). There is also a somewhat sticky matter, of C routines that returns fairly complex types, like pointers, strings.

Re: [Rd] data frame subset patch, take 2

2006-12-13 Thread Vladimir Dergachev
On Wednesday 13 December 2006 1:23 pm, Marcus G. Daniels wrote: > Vladimir Dergachev wrote: > > 2. It would be nice to have true hashed arrays in R (i.e. O(1) access > > times). So far I have used named lists for this, but they are O(n): > > new.env(hash=TRUE) with get/assign/exists works ok.

Re: [Rd] data frame subset patch, take 2

2006-12-13 Thread Robert Gentleman
Hi, We had the "names" discussion and, AFAIR, the idea that someone might misinterpret the output as suggesting that one could index by number, seemed to kill it. A more reasonable argument against is that names<- is problematic. You can use $, [[ (with character subscripts), and yes ls does

[Rd] Curious finding in MASS:::confint.glm() tied to eval()

2006-12-13 Thread Marc Schwartz
Greetings all, I was in the process of creating a function to generate profile likelihood confidence intervals for a proportion using a binomial glm. This is a component of a larger function to generate and plot confidence intervals for proportions using the above, along with bootstrap (BCa), Wils

Re: [Rd] data frame subset patch, take 2

2006-12-13 Thread Robert Gentleman
Robert Gentleman wrote: > Hi, >We had the "names" discussion and, AFAIR, the idea that someone might > misinterpret the output as suggesting that one could index by number, > seemed to kill it. A more reasonable argument against is that names<- is > problematic. > > You can use $, [[ (wit

[Rd] caching frequently used values

2006-12-13 Thread Tamas K Papp
Hi, I am trying to find an elegant way to compute and store some frequently used matrices "on demand". The Matrix package already uses something like this for storing decompositions, but I don't know how to do it. The actual context is the following: A list has information about a basis of a B-

[Rd] Using substitute from inside an S4 method

2006-12-13 Thread Franck Arnaud
Hi all, I don't understand why this does not what I expect : ## code start here ## setClass("num",representation(x="numeric")) num<-function(x) new("num",x=x) add<-function(e1,e2) { cat("Computing ",deparse(substitute(e1)),"+",deparse(substitute(e2)),"\n") [EMAIL PROTECTED]@x

Re: [Rd] caching frequently used values

2006-12-13 Thread Robert Gentleman
the idea you are considering is also, at times, referred to as memoizing. I would not use a list, but rather an environment, and basically you implement something that first looks to see if there is a value, and if not, compute and store. It can speed things up a lot in some examples (and slow

Re: [Rd] caching frequently used values

2006-12-13 Thread Tamas K Papp
Hi Robert, Thanks for your answer. I would create and environment with new.env(), but how can I assign and retrieve values based on a numerical index (the derivative)? The example of the help page of assign explicitly shows that assign("a[1]") does not work for this purpose. Thanks, Tamas On

Re: [Rd] [R] Segfault in pure R code

2006-12-13 Thread Göran Broström
On 12/13/06, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Göran Broström wrote: > > I tried once more under the debugger, and > > > > ++ > > [EMAIL PROTECTED]:~/R/BEMANNING/Doc$ R -d gdb > > GNU gdb 6.5-debian > > Copyright (C) 2006 Free Software Foundation, I

Re: [Rd] caching frequently used values

2006-12-13 Thread Tamas K Papp
On Wed, Dec 13, 2006 at 03:05:46PM -0800, Robert Gentleman wrote: > e1 = new.env(hash=TRUE) > > e1[["1"]] = whateveryouwant > > ie. just transform to characters, but I don't see why you want to do > that - surely there are more informative names to be used - Because they are derivatives, and b

Re: [Rd] caching frequently used values

2006-12-13 Thread Robert Gentleman
e1 = new.env(hash=TRUE) e1[["1"]] = whateveryouwant ie. just transform to characters, but I don't see why you want to do that - surely there are more informative names to be used - Tamas K Papp wrote: > Hi Robert, > > Thanks for your answer. I would create and environment with > new.env(),

Re: [Rd] caching frequently used values

2006-12-13 Thread Seth Falcon
Tamas K Papp <[EMAIL PROTECTED]> writes: > On Wed, Dec 13, 2006 at 03:05:46PM -0800, Robert Gentleman wrote: > >> e1 = new.env(hash=TRUE) >> >> e1[["1"]] = whateveryouwant >> >> ie. just transform to characters, but I don't see why you want to do >> that - surely there are more informative name

[Rd] A possible improvement to apropos

2006-12-13 Thread Seth Falcon
Hello all, I've had the following apropos alternative in my ~/.Rprofile for some time, and have found it more useful than the current version. Basically, my version ignores case when searching. If others find this useful, perhaps apropos could be suitably patched (and I'd be willing to create suc

Re: [Rd] caching frequently used values

2006-12-13 Thread Henrik Bengtsson
I use the R.oo Object class for what has been suggested previously. The Object class can be thought of as utility wrapper class for environments (actually environments gained much of its behavior some time ago when "$" etc was being mapped to get() calls). For caching to file, take a look at the R