Re: [R] getWinProgressBar does not return previous value

2008-05-10 Thread Prof Brian Ripley
On Fri, 9 May 2008, Michael DiPersio wrote: I am trying to use winProgressBar, however I find that although setWinProgressBar updates the value on the screen, getWinProgressBar does not return this value. E.g pb - winProgressBar() setWinProgressBar(pb, 0.2) getWinProgressBar(pb) [1] 0 It

Re: [R] lme nesting/interaction advice

2008-05-10 Thread Kingsford Jones
On Fri, May 9, 2008 at 4:04 AM, Federico Calboli [EMAIL PROTECTED] wrote: Note that random can be a list: a one-sided formula of the form ~x1+...+xn, or a pdMat object with a formula (i.e. a non-NULL value for formula(object)), or a list of such formulas or pdMat objects. If you can

[R] problem reading .por SPSS file

2008-05-10 Thread Viktor Nagy
Hello, I've a .por file from 1998. I've tried to read it with library(foreign) read.spss(mhp_hu.por) at this point R simply stops working and my whole system is close to unusable I've found one related thread, but even there no real solution was given

Re: [R] Create pairwise table from columns?

2008-05-10 Thread Bill.Venables
Here is a suggestion con - textConnection(AnimalA,AnimalB,Score A1,A2,1 A1,A3,2 A1,A4,3 A2,A3,4 A2,A4,5 A3,A4,6 ) tst - read.csv(con) close(con) an - with(tst, sort(unique(c(as.character(AnimalA), as.character(AnimalB) M - array(0,

Re: [R] function in nls argument -- robust estimation

2008-05-10 Thread Martin Maechler
Hi Kate and Fernando, I'm late into this thread, but from reading it I get the impression that Fernando really wants to do *robust* (as opposed to least-squares) non-linear model fitting. His proposal to set residuals to zero when they are outside a given bound is a very special case of an

Re: [R] problem reading .por SPSS file

2008-05-10 Thread Prof Brian Ripley
And how are we supposed to help without knowing your version of R, the version of 'foreign', anything about your system (or you) and without access to the file? Please do consult the posting guide and supply enough information that we have a chance of helping you. On Sat, 10 May 2008,

[R] How many random numbers needed?

2008-05-10 Thread Birgit Lemcke
Hello R-People! I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner) Perhaps this is another stupid question of me, but I was wondering how I know the needed random (set.seed) numbers, when running randomForest (library randomForest) on a large dataset.

[R] Hashes as S4 Classes, or: How to separate environments

2008-05-10 Thread Hans W Borchers
For learning purposes mainly I attempted to implement hashes/maps/dictionaries (Python lingua) as S4 classes, see the coding below. I came across some rough S4 edges, but in the end it worked (for one dictionary). When testing ones sees that the dictionaries D1 and D2 share their environments

Re: [R] irregular time series and multiple, overlaid plots

2008-05-10 Thread Gabor Grothendieck
Look at the zoo and quantmod packages. On Sat, May 10, 2008 at 12:51 AM, falcon [EMAIL PROTECTED] wrote: I am new to R and am trying to solve the following problem: I have a data file containing tick-by-tick, millisecond level prices for some stocks. I have another file or two containing

Re: [R] problem reading .por SPSS file

2008-05-10 Thread Viktor Nagy
sorry, but it turned out that only the file was bigger than my patience (next time I will be more careful about the posting guide as well) thanks for your time! Viktor 2008/5/10 Prof Brian Ripley [EMAIL PROTECTED]: And how are we supposed to help without knowing your version of R, the

Re: [R] Create pairwise table from columns?

2008-05-10 Thread knussear
Fantastic! Thanks very much! Where can I read more about the double assignment statement at the bottom? Closest I could get was a double for loop, which takes a long time Bill.Venables wrote: Here is a suggestion con - textConnection(AnimalA,AnimalB,Score A1,A2,1 A1,A3,2

Re: [R] Hashes as S4 Classes, or: How to separate environments

2008-05-10 Thread Martin Morgan
Hi Hans -- Hans W Borchers [EMAIL PROTECTED] writes: For learning purposes mainly I attempted to implement hashes/maps/dictionaries (Python lingua) as S4 classes, see the coding below. I came across some rough S4 edges, but in the end it worked (for one dictionary). When testing ones sees

Re: [R] How many random numbers needed?

2008-05-10 Thread Gavin Simpson
On Sat, 2008-05-10 at 13:21 +0200, Birgit Lemcke wrote: Hello R-People! I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner) Perhaps this is another stupid question of me, but I was wondering how I know the needed random (set.seed) numbers, when running

Re: [R] Create pairwise table from columns?

2008-05-10 Thread hadley wickham
On Fri, May 9, 2008 at 7:17 PM, knussear [EMAIL PROTECTED] wrote: Hi Group I have a large data set of individual pairwise values (250,000 rows) that I need to reshape into a pairwise matrix for mantel tests of these values versus genetic distances. the data are currently in columns

Re: [R] Hashes as S4 Classes, or: How to separate environments

2008-05-10 Thread Charilaos Skiadas
On May 10, 2008, at 7:30 AM, Hans W Borchers wrote: For learning purposes mainly I attempted to implement hashes/maps/ dictionaries (Python lingua) as S4 classes, see the coding below. I came across some rough S4 edges, but in the end it worked (for one dictionary). When testing ones sees

Re: [R] How many random numbers needed?

2008-05-10 Thread Birgit Lemcke
Thank you Gavin. I knew about the meaning set.seed for reproducability but I did not realise that it is only the starting point. Is it possible that very small or very big random numbers cause any kind of bias? B. Am 10.05.2008 um 14:50 schrieb Gavin Simpson: On Sat, 2008-05-10 at

Re: [R] function in nls argument -- robust estimation

2008-05-10 Thread Katharine Mullen
Dear Martin, Thanks for the ideas regarding the relation of what Fernando is doing with robust regression. Indeed, it's an important point that he can't consider the standard error estimates on his parameters correct. I know from discussion off-list that he's happy with the results he has now;

Re: [R] Error while making R package

2008-05-10 Thread Uwe Ligges
Vidhu Choudhary wrote: Hi All, *I am still facing the problems in making R package on windows. * -- Making package t1 adding build stamp to DESCRIPTION installing NAMESPACE file and metadata making DLL ... making

[R] Simple regex problem

2008-05-10 Thread John Kane
I am cleaning up some character data to convert to dates using chron. The regex that I am using work fine but there should be a better way to do this. Can anyone suggest a cleaner bit of code than the gsub, sub approach? Thanks #Test Run on dates. xx - c(May 1, 2007, May 2, 2007, May 3, 2007,

[R] [R-pkgs] AER: Applied Econometrics with R

2008-05-10 Thread Achim Zeileis
The package AER accompanying the forthcoming book Applied Econometrics with R by Christian Kleiber and me in the Springer useR! series has (finally!) been released to CRAN: http://CRAN.R-project.org/package=AER It contains some new R functionality o tobit regression convenience interface (to

[R] Compact Indicator Matrices

2008-05-10 Thread amarkos
An indicator matrix is a binary matrix with orthogonal columns whose rows sum to 1. A row of this matrix could be [0 1 0 0]. My problem is to group the similar rows (profiles) so that to create a compact form of the matrix. Is there an R function that deals with this problem or do I have to write

[R] help needed with rbftrain

2008-05-10 Thread Invernomuto
Hello everybody, I'm new to R. I'm trying to set up a Rbf network using the rbftrain function but I get an error I can't understand. this is what I type: rbftrain(input,3,output,visual=F) where input is a matrix with 198 rows and 6 columns and output is a matrix with 198 rows and one column.

Re: [R] For Social Network Analysis-Graph Analysis - How to convert 2 mode data to 1 mode data?

2008-05-10 Thread Gabor Csardi
Solomon, if i understand two-mode networks properly (they're bipartite, right?), then this is not hard to do with igraph. Basically, for each vertex create an order=2 neighborhood, and then create a graph from the adjacency list, it is something like this: two.to.one - function(g, keep) { neis

Re: [R] Simple regex problem

2008-05-10 Thread Ted Harding
On 10-May-08 16:49:20, John Kane wrote: I am cleaning up some character data to convert to dates using chron. The regex that I am using work fine but there should be a better way to do this. Can anyone suggest a cleaner bit of code than the gsub, sub approach? Thanks #Test Run on dates. xx

Re: [R] Simple regex problem

2008-05-10 Thread Gabor Grothendieck
Try this (no gsub required): as.chron(as.Date(xx, %b %d, %Y)) On Sat, May 10, 2008 at 12:49 PM, John Kane [EMAIL PROTECTED] wrote: I am cleaning up some character data to convert to dates using chron. The regex that I am using work fine but there should be a better way to do this. Can anyone

Re: [R] Error while making R package

2008-05-10 Thread Gabor Grothendieck
There isn't enough information there to really know but I would at least try this: - upgrade to R 2.7 - make sure you are using the most recent version of rtools from Duncan Murdoch's site - remove the data directory in your package since its the last thing referred to prior to the errors - if

[R] Random number generation

2008-05-10 Thread Dennis Fisher
Colleagues, I have encountered behavior of random number generation that eludes me. I generate a random integer in a particular range using the following code: sample(1000:, size=1) This code exists within a script that starts with the command: remove(list=ls()) Each time

[R] BiodiversityRGUI_problem2

2008-05-10 Thread Branimir Hackenberger
After some investigation I found out that constrained ordination is working fine under R version 6.5.0 and 6.5.1 but not under any of newer versions. Is it posible to repair/make something in for example newest version of R 7.0 lito enble correct using of constrained ordination under

Re: [R] substitute in graphics - Uwe's help desk

2008-05-10 Thread Gustave Lefou
Thank to both of you. I found an interesting document by Uwe Ligges in Rnews December 2002 (Vol 2/3) The following seems encouraging x=seq(1,180,by=1) beta=10 eta=5 plot(x,log(x),type=p,xlab=x,ylab=h(x),main=substitute(Failure rate * eta==myeta * , * beta ,list(myeta=eta,mybeta=beta)) ) but

Re: [R] Error while making R package

2008-05-10 Thread Duncan Murdoch
On 10/05/2008 4:54 PM, Duncan Murdoch wrote: On 09/05/2008 11:58 AM, Vidhu Choudhary wrote: rm: failed to get attributes of `/': No such file or directory I believe that's a sign of using a bad toolset. Make sure if you have Cygwin installed, it comes *after* the Rtools on your path. It

Re: [R] BiodiversityRGUI_problem2

2008-05-10 Thread Gavin Simpson
Branimir, You would be better off addressing these issues with the package maintainer. See the details for the package on CRAN for example to find out the email address of the maintainer. You could always use vegan the old-fashioned way and type the relevant commands at the prompt. If your

[R] subset rows in two dataframes

2008-05-10 Thread partofy
Dear list: I have two dataframes, say dat1 and dat2. Each has several variables but 3 of each are common in both, (say v1, v2 and v3). v1 and v2 are factores while v3 is numeric. Now, I need a subset to extract the rows in which v1, v2 and v3 are the same in both dataframes. I tried:

Re: [R] subset rows in two dataframes

2008-05-10 Thread jim holtman
This seems to work for me: set.seed(1) df1 - data.frame(v1=factor(sample(1:4,20,TRUE)), v2=factor(sample(1:3,20,TRUE)), v3=sample(1:3,20,TRUE)) df2 - data.frame(v1=factor(sample(1:2,20,TRUE)), v2=factor(sample(1:2,20,TRUE)), v3=sample(1:2,20,TRUE)) subset(df1, (df1$v1 %in% df2$v1)

Re: [R] subset rows in two dataframes

2008-05-10 Thread partofy
Thanks for your reply. In fact I dont get none error message, I just simply found that some rows do not match in both dataframes. I thought it was some evident problem with my code, but it seems it is not. I'll try to check and if I can, I'll post a reproducible example. Justin On Sat, 10 May

[R] predict lmer

2008-05-10 Thread John Maindonald
The following function is designed to work with a logit link. It can easily be generalized to work with any link. The SEs and CIs are evaluated accounting for all sources of random variation. The plot may not be much help unless there is just one explanatory variate. `ciplot` -

[R] Creating data.frames dynamically

2008-05-10 Thread Worik R
I have time series data in named vectors. They are all the same length for the same dates. The dates are in a separate vector. I want to create a vector of numeric data for every named series, associated with the dates in a data.frame. So if... Names - c(a, b, c) d - data.frame(dates=Dates,