search for: bieli

Displaying 11 results from an estimated 11 matches for "bieli".

2006 Feb 14
2
How to handle large dataframes?
...here something I can do after importing that makes data handling faster? My hardware is up-to-date (Intel P4, 3 Ghz, 1 GB RAM) and I work on a Windows XP platform. I am working on a Windows XP platform with R version 2.1 (all packages updated). Thanks for your answers. Christian -- Christian Bieli, project assistant Institute of Social and Preventive Medicine University of Basel, Switzerland Steinengraben 49 CH-4051 Basel Tel.: +41 61 270 22 12 Fax: +41 61 270 22 25 christian.bieli at unibas.ch www.unibas.ch/ispmbs
2006 Jan 20
2
assign object to list
...mylist <- list(a,b) Is there a way to place the dataframes into the list giving them the attribute at the same time? I don't want to create all the dataframes in my workspace first. I tried it with parentheses {}, but it obviously did not work. Thanks in advance. Christian -- Christian Bieli, project assistant Institute of Social and Preventive Medicine University of Basel, Switzerland Steinengraben 49 CH-4051 Basel Tel.: +41 61 270 22 12 Fax: +41 61 270 22 25 christian.bieli at unibas.ch www.unibas.ch/ispmbs
2007 Jun 22
2
extract index during execution of sapply
Hi there During execution of sapply I want to extract the number of times the function given to supply has been executed. I came up with: mylist <- list(a=3,b=6,c=9) sapply(mylist,function(x)as.numeric(gsub("[^0-9]","",deparse(substitute(x))))) This works fine, but looks quite ugly. I'm sure that there's a more elegant way to do this. Any suggestion? Christian
2005 Nov 29
1
Indexing variables within lapply?
...and var1 of data1b) within each list element. I tried to do it with lapply(data, myfunction,...), but I dont know if theres a way to index the two vars within lapply. There is certainly a way to do it by looping, but lapply is much more elegant. Thank you for your help. Christian -- Christian Bieli, project assistant Institute of Social and Preventive Medicine University of Basel, Switzerland Steinengraben 49 CH-4051 Basel Tel.: +41 61 270 22 12 Fax: +41 61 270 22 25 christian.bieli@unibas.ch www.unibas.ch/ispmbs [[alternative HTML version deleted]]
2005 Jul 22
3
problems with submitting an eps-file created in R
...er way to embed fonts? 2. Is there a way to set up the resolution of the created ps/eps-file in R (until now I did the settings in ghostview)? 3. I did not find particulars about the pointsize option. What is the effect of changing the pointsize value? With best regards Christian -- Christian Bieli, project assistant Institute of Social and Preventive Medicine University of Basel, Switzerland Steinengraben 49 CH-4051 Basel Tel.: +41 61 270 22 12 Fax: +41 61 270 22 25 christian.bieli at unibas.ch www.unibas.ch/ispmbs
2006 Jun 30
2
Passing arguments to glm()
Hi there I want to pass arguments (i.e. the response variable and the subset argument) in a self-made function to glm. Here is one way I can do this: f.myglm <- function(y,subfact,subval) { glm(d.mydata[,y]~d.mydata[,'x1'],family=binomial,subset=d.mydata[,subfact]==subval) } > str(d.mydata) `data.frame': 15806 obs. of 3 variables: $ y : Factor w/ 2 levels
2006 Jan 11
1
updating formula inside function
Dear R-Helpers Given a function like foo <- function(data,var1,var2,var3) { f <- formula(paste(var1,'~',paste(var2,var3,sep='+'),sep='')) linmod <- lm(f) return(linmod) } By typing foo(mydata,'a','b','c') I get the result of the linear model a~b+c. How can I rewrite the function so that the formula can be updated inside the function,
2012 Oct 29
6
export variable from bash to R
Dear R experts This probably seems very easy to you guys, but I'm a beginner and would be really glad if someone helped me with this: I am trying to automate the execution of an R script (let's call it "myscript.R") by passing a variable from a bash script to myscript.R. I know I can use the command Rscript, but I don't know how to declare in bash which variable will be
2006 Oct 06
2
factor levels with umlauts
Hi all I have to generate some test data for import in an sql database. The database is meant for web-based data entry in a study taking place in a german speaking region, so factor levels of the variables include umlauts. The variables in the dataframe t.muster are generated e.g. like this: t.muster$screening <- rep("ausgef?llt",50) and exported to a .csv file by:
2007 Jun 24
2
matlab/gauss code in R
...e so it is more specific > than "Re: Contents of R-help digest..." > > > Today's Topics: > > 1. what is "better" when combining data frames? merge vs. rbind > & cbind (Thomas Pujol) > 2. extract index during execution of sapply (Christian Bieli) > 3. multiple return (Manuele Pesenti) > 4. Re: what is "better" when combining data frames? merge vs. > rbind & cbind (Duncan Murdoch) > 5. Re: multiple return (Mahbub Latif) > 6. Re: how to create cumulative histogram from two independent > v...
2006 May 22
1
random generation of a factor
Hi everybody Does anybody know a function that generates a factor of length N with K levels given the proportions c(p1, p2,... ,pk)? It would not be too hard to write it for myself, but if there's a preexisting one.. I searched the documentation and the help archive, but could not find anything helpful. > version _ platform i386-pc-mingw32 arch i386