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

2008-11-25 Thread Martin Elff
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 - Dr. Martin Elff Lecturer LSPWIVS (Prof. van Deth) Department of Social Sciences

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 simulation of Schelling's neighbourhood model. Although

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

2008-10-11 Thread Martin Elff
: 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 data including value labels, definable

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

2008-08-25 Thread Martin Elff
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 Department of Social Sciences University of Mannheim A5, Room 328 68131

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

2008-03-06 Thread Martin Elff
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: 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

Re: [R] R-Terminal

2008-03-05 Thread Martin Elff
(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-181-2093 Fax: +49-621-181-2099 E-Mail: [EMAIL PROTECTED] Web: http://webrum.uni

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 log(y) ~ log(a)

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. What am

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 seems to do it:

Re: [R] regression output to latex

2008-03-03 Thread Martin Elff
, 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 Sciences LSPWIVS (van Deth) University of Mannheim

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 data

Re: [R] Problems with aggregate

2008-02-22 Thread Martin Elff
- Dr. Martin Elff Faculty of Social Sciences LSPWIVS (van Deth) University of Mannheim A5, 6 68131 Mannheim Germany Phone: +49-621-181-2093 Fax: +49-621-181-2099 E-Mail: [EMAIL PROTECTED] Web: http://webrum.uni-mannheim.de/sowi/elff/ http://www.sowi.uni-mannheim.de/lspwivs

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    b 2 5    b 3 6  

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.

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)); df2-

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] 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 = colo,

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))