Re: [R] how to read .sps (SPSS file extension)?

2008-11-25 Thread Martin Elff
you could try one of 'spss.fixed.file' 'spss.portable.file' or 'spss.system.file' from package 'memisc' (on CRAN). The package contains some features that allow to retain the information contained in spss's value labels, missing values etc. HTH Martin

Re: [R] Agent-based social simulation and R

2008-11-07 Thread Martin Elff
On Friday 07 November 2008 (19:45:04), you wrote: > Martin Elff wrote: > > Hi Tom, > > > > my package 'memisc' contains a sort of an infrastructure for doing > > simulations. As a fun exercise I also used it to create a 'toy' agent > > based si

[R] [R-pkgs] New verision 0.95 of package 'memisc' released to CRAN

2008-10-11 Thread Martin Elff
stics, and Simulation Version: 0.95-1 Date: 2008-10-1 Author: Martin Elff Maintainer: Martin Elff <[EMAIL PROTECTED]> Description: One of the aims of this package is to make life easier for useRs who deal with survey data sets. It provides an infrastructure for the management of survey da

Re: [R] Output to Latex using Memisc almost works

2008-08-25 Thread Martin Elff
file. This will automagically insert the dollars into the columns. memisc's mtable function works fine with that (at least in my experience, I use it on a regular basis as one might suspect :-) Cheers, Martin -- ----- Dr. Martin Elff Departm

Re: [R] nls: different results if applied to normal or linearized data

2008-03-06 Thread Martin Elff
has very little mass in the tails and is often used as a model for > non-negative quantities (and e.g. the justification of Box-Cox estimation > relies on this). > > On Wed, 5 Mar 2008, Martin Elff wrote: > > On Wednesday 05 March 2008 (14:53:27), Wolfgang Waser wrote: > >> Dea

Re: [R] nls: different results if applied to normal or linearized data

2008-03-05 Thread Martin Elff
On Wednesday 05 March 2008 (14:53:27), Wolfgang Waser wrote: > Dear all, > > I did a non-linear least square model fit > > y ~ a * x^b > > (a) > nls(y ~ a * x^b, start=list(a=1,b=1)) > > to obtain the coefficients a & b. > > I did the same with the linearized formula, including a linear model > > l

Re: [R] R-Terminal

2008-03-05 Thread Martin Elff
has an effect... iris[1:10,] Sink() as.matrix(readLines("test.out")) iris[1:10,] Best, Martin - Dr. Martin Elff Faculty of Social Sciences LSPWIVS (van Deth) University of Mannheim A5, 6 68131 Mannheim Germany Phone: +49-621-1

Re: [R] R-Terminal

2008-03-04 Thread Martin Elff
On Tuesday 04 March 2008 (12:34:47), Peter Dalgaard wrote: > Martin Kaffanke wrote: > > Hi there! > > > > I use an gnome-terminal for using R. When I resize the termial to the > > maximum size, R uses only the left side of the window. Can I tell R to > > use the whole window somehow? > > This see

Re: [R] looping through data frames in a workspace

2008-03-04 Thread Martin Elff
On Monday 03 March 2008 (23:28:05), lucy b wrote: > I would like to avoid having to type-out a very long list over and > over again. I have tried every variation I could think of similar to: > > for(df in list(noquote(ls( { > >      do stuff with df > >      } > > I know this has to be possible

Re: [R] Replace a list of values in data frame

2008-03-03 Thread Martin Elff
On Friday 29 February 2008 (14:50:53), Silvia Lipski wrote: > Dear R-users, > > I am sorry if I ask for something that has been asked > before, however, I still could not solve my little > problem by consulting the previous thread on this > topic: > > I would like to replace several values in a dat

Re: [R] regression output to latex

2008-03-03 Thread Martin Elff
enthesis below the first, and other statistics (R^2 etc) . Function 'mtable' from the package 'memisc' is designed to do this. Maybe that is what you are looking for ... Best, Martin ----- Dr. Martin Elff Faculty of Social Sci

Re: [R] Problems with aggregate

2008-02-22 Thread Martin Elff
ain.  Still the > same problem!!! > >   > > So, it seems that after running this code once, suddenly aggregate does > not work!!! > >   > > Can anyone help me? > >   -- 10.0 times 0.1 is hardly ever 1.0 Kernighan and Plauger ---

Re: [R] How to get names of a list into df:s?

2008-02-21 Thread Martin Elff
On Thursday 21 February 2008 (19:22:40), Lauri Nikkinen wrote: > R users, > > I have a simple lapply question. > > g <- list(a=1:3, b=4:6, c=7:9) > g <- lapply(g, function(x) as.data.frame(x)) > And I would like to have > > $a >   x var1 > 1 1    a > 2 2    a > 3 3    a > > $b >   x var1 > 1 4    

Re: [R] Looping through a list of objects & do something...

2008-02-19 Thread Martin Elff
On Tuesday 19 February 2008 (19:51:15), TLowe wrote: > Hey Folks, > > Could somebody show me how to loop through a list of dataframes? I want to > be able to generically access their elements and do something with them. > > For instance, instead of this: > > df1<- data.frame(x=(1:5),y=(1:5)); > df

Re: [R] change NA values

2008-02-19 Thread Martin Elff
On Tuesday 19 February 2008 (12:33:21), Alfonso Pérez Rodríguez wrote: > Hello, I'm sure that this question is too simple, but, I'm begining with R > and I'm not able to change the NA values in a matrix by 0 values, and it's > necessary for my work, how can I do It? Thank you. your.matrix[is.na(yo

Re: [R] axis help

2008-02-06 Thread Martin Elff
On Wednesday 06 February 2008 (15:14:28), [EMAIL PROTECTED] wrote: > Hi, i'm having trouble with my x and y axis. The commands i'm using are >below. The problem is that the y axis starts at coordinate 0,1 and the x >axis starts at coordinate 0,0. As far as I know the y axis can't start

Re: [R] 3D correlation

2008-02-06 Thread Martin Elff
On Wednesday 06 February 2008 (01:35:15), [EMAIL PROTECTED] wrote: > how to generate correlated data which is correlated in three variables?? # Your correlation matrix S <- rbind( c(1,.3,.3), c(.3,1,.3), c(.3,.3,1) ) # Three independent normal variates x1 <- rnorm(1000) x2 <- rnorm(1000)

Re: [R] How to generate table output of a series of lm's

2008-02-06 Thread Martin Elff
On Wednesday 06 February 2008 (09:34:53), Dieter Menne wrote: > Martin Elff sowi.uni-mannheim.de> writes: > > modco <- list( > > lm(normskvop ~ I(nts^0.5)-1, data = colo,weights=wtz), > > lm(normskvop ~ I(nts^0.5)-1, data = colo,weights=wtz, > > subset=s

Re: [R] modifying arrays within functions

2008-02-05 Thread Martin Elff
On Tuesday 05 February 2008 (16:51:41), Konrad BLOCHER wrote: > Hi, > > I'm pretty new to R and seem to be having difficulties with writing a > function that would change an array and keep the change after the function > finishes its work. > It seems you want this: X<-array(1,dim=c(2,2)) addition<

Re: [R] How to generate table output of a series of lm's

2008-02-05 Thread Martin Elff
On Tuesday 05 February 2008 (15:54:26), Daniel Dunn wrote: > I have a related question. Suppose I generate a series of linear models > > modco=list() > modco[[length(modco)+1]]=lm(normskvop ~ I(nts^0.5)-1, data = colo, > weights=wtz) > modco[[length(modco)+1]]=lm(normskvop ~ I(nts^0.5)-1, data = c