Re: [R] selection list

2008-11-20 Thread thoeb
Thanks! I think the tcltk package will be the best solution.. I'll try at once. - Tamara Hoebinger University of Vienna -- View this message in context: http://www.nabble.com/selection-list-tp20580397p20596450.html Sent from the R help mailing list archive at Nabble.com.

[R] Elegant way to transform dataframe?

2008-11-20 Thread Barry Rountree
Hello, I have a dataframe with columns like: parameter1 parameter2 metricname value and I'd like to transform it into a dataframe with columns: parameter1 parameter2 metric1 metric2 metric3 where the values for each metric would be in the appropriate column. There are often multiple

[R] Repost:lattice graphics -- legend color problems

2008-11-20 Thread Heidemeier Dr, Joachim
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use (with a col = mypalette argument) it in the barchart plot. The resulting graph shows the new palette in the graph, but uses the standard palette in the legend rectangles.

Re: [R] F-Tests in generalized linear mixed models (GLMM)

2008-11-20 Thread Björn Stollenwerk
It was fitted with the function gamm (generalized additive mixed model) of the package mgcv: glm1.gamma - gamm(y ~ x1 + x2, random=list(random1 = ~1), family=Gamma(link=log)) However, it's just a generalized linear mixed model (GLMM), because smooth terms are missing. Douglas Bates schrieb:

Re: [R] Multidimensional array with R

2008-11-20 Thread Robin Hankin
Hello a good place to start is R-and-octave.txt, in the contributed docs section of CRAN. This translates between common matlab and R commands HTH rksh Michael Zak wrote: Hi there I know, I'm sure you discussed this stuff 100 times, but I really have a basic understanding problem, if

[R] sub / gsub - extracting between identical symbols

2008-11-20 Thread Daniel Malter
Hi, I am trying to extract some numbers from a text string. The problem is that the delimiting symbols are identical so that I do not know how to tell sub between which of them to extract. The string looks like this 12/01/03/08 The extracted variables should look like: x1=12 x2=01 x3=03 x4=08

Re: [R] Repost:lattice graphics -- legend color problems

2008-11-20 Thread Felix Andrews
Don't use col = p; use par.settings = simpleTheme(col = p) 2008/11/20 Heidemeier Dr, Joachim [EMAIL PROTECTED]: Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use (with a col = mypalette argument) it in the barchart

Re: [R] Calculating SD according to groups of rows

2008-11-20 Thread Dieter Menne
pufftissue pufftissue pufftissue at gmail.com writes: What I am getting is indeed: 7200 23955345638934 16.39977 10.0389611.234 14.02 I'd like the final output to be: subject_id hr_Stand_Deviation 7200 16.39977 23955

Re: [R] About continuity correction option in the mantelhaen.test function.

2008-11-20 Thread Peter Dalgaard
Paek, Insu wrote: Hello, I was using the mantelhaen.test function (2x2 J tables for conditional independence testing). I noticed that the option for the continuity correction (correction=T or correction=F) sometimes made a difference while sometimes it did give the same results regardless of

Re: [R] Elegant way to transform dataframe?

2008-11-20 Thread ONKELINX, Thierry
Dear Barry, Have a look at the function cast() in the reshape package. That should be able to do what you need. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for

Re: [R] simplify this instruction

2008-11-20 Thread Wacek Kusnierczyk
David Winsemius wrote: On Nov 19, 2008, at 8:38 PM, Wacek Kusnierczyk wrote: Jorge Ivan Velez wrote: B=0:12 B [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 ifelse(B%in%c(0:9),'A','B') [1] A A A A A A A A A A B B B given the example, the solution would rather be if (B %in%

Re: [R] simplify this instruction

2008-11-20 Thread Wacek Kusnierczyk
Rolf Turner wrote: The issue worrying Wacek was presumably the fact that the original poster was treating the ``B'' variable as being character, rather than numeric. So (presumably) what he *really* wanted to say was (something like) ifelse(B%in%as.character(0:9),A,B) yepp. Of course

[R] Nonlinear restrictions in systemfit

2008-11-20 Thread soetzel
Hey, I want to implement a structural model with the package systemfit with some linear and nonlinear constraints. How to implement linear restrictions is clear. Does anybody know how to set up nonlinear restrictions in the systemfit packages. For example: beta1 = beta2-(beta4/beta6) I look

[R] extracting data from a list of unformatted text files

2008-11-20 Thread ravi
Hi, I want to extract information from a number of text files in a folder. The files are named as : 82534.txt, 82555.txt, 8282787.txt etc. I give below a sample of the kind of the information in the text file : #(a lot of preceding text) 2008-10-01  06:30:12                2 of 3

Re: [R] sub / gsub - extracting between identical symbols

2008-11-20 Thread Henrique Dallazuanna
Try this: unlist(strsplit(12/01/03/08, /)) On Thu, Nov 20, 2008 at 6:08 AM, Daniel Malter [EMAIL PROTECTED] wrote: Hi, I am trying to extract some numbers from a text string. The problem is that the delimiting symbols are identical so that I do not know how to tell sub between which of them

Re: [R] Calculating SD according to groups of rows

2008-11-20 Thread Petr PIKAL
What about aggregate. with(dat, aggregate(HR, list(sub_id=SUBJECT_ID), sd)) shall result in required final output form. Regards Petr [EMAIL PROTECTED] napsal dne 20.11.2008 09:20:36: pufftissue pufftissue pufftissue at gmail.com writes: What I am getting is indeed: 7200

[R] Partial residual plots in gls

2008-11-20 Thread Jaime Otero Villar
Hi, Is there any quick way to visualize partial residual plots (as 'termplot'), and Cook's distances when fitting a gls model of the form: model1-gls(y~x1+x2+x3,weights=varIdent(form=~1| x4),method=ML,data=models) Thanks. Jaime. [[alternative HTML version deleted]]

[R] How to convert S4 class slots into data.frame or how to assign variables of type 'Date'

2008-11-20 Thread Ronny Wölbing
Hi, I created a class (S4) with some slots like value, date, description (it's actually a financial transaction class). Now I need a method to convert this class forth and back into a single row data.frame, where every slots represents a column. This method looks at the moment like

Re: [R] Nonlinear restrictions in systemfit

2008-11-20 Thread Arne Henningsen
On Thursday 20 November 2008 09:55:03, soetzel wrote: I want to implement a structural model with the package systemfit with some linear and nonlinear constraints. How to implement linear restrictions is clear. Does anybody know how to set up nonlinear restrictions in the systemfit

[R] generate random number

2008-11-20 Thread Odette Gaston
Hi everybody, I am currently working on glmmML() and wish to generate random number to do some tests, however, glmm was hypothesized the mixed distributions with normal and binomial in terms of having a random effect. How would you be able to generate random number in this case? Is there a

[R] pdf device: rasterize portions of the plot to reduce file size

2008-11-20 Thread baptiste auguie
Dear list, My favorite output format is usually pdf. I can include the graphics in pdflatex documents and benefit from the scalable nature of vector graphic formats. However, I recently had to generate high-res 2D levelplot graphics as in the example below, N - 100 # N - 1000 # slow to

Re: [R] generate random number

2008-11-20 Thread Dimitris Rizopoulos
check the following code: # settings n - 100 # number of sample units p - 10 # number of repeated measurements N - n * p # total number of measurements t.max - 3 # parameter values betas - c(0.5, 0.4, -0.5, -0.8) # fixed effects (check also 'X' below) sigma.b - 2 # random effects variance #

[R] different ACF results

2008-11-20 Thread Sara Mouro
Dear all, I have one Model (M3) fitted using the lme package, and I have checked the correlation structure of within-group errors using plot(ACF (M3,maxLag=10),alpha=0.05) But now I am not sure how to interpret this plot for the empirical autocorrelation function. The problem is that I am

Re: [R] pdf device: rasterize portions of the plot to reduce file size

2008-11-20 Thread Stefan Evert
With N=1000, this approach produces a hefty pdf file of ~29MB, while the png file with default resolution is only 72kB. It is clear that I don't want to include the pdf figure in a manuscript, as most pdf readers (let alone the printer) will painfully stall when scrolling down the

[R] Fitting a model

2008-11-20 Thread Dani Valverde
Hello, This is a very basic question, but I don'y know the answer. I have these data delta - c(28.6-8.825,28.6-8.828,28.6-8.836,28.6-8.845,28.6-8.897,28.6-8.944,28.6-9.027,28.6-9.091,28.6-9.263,28.6-9.4,28.6-9.7,28.6-9.981, 28.6-10.287,28.6-10.48,28.6-10.684,28.6-10.875) ph -

[R] Set of standard city size symbols as known from atlases?

2008-11-20 Thread Werner Wernersen
Hi, I am wondering exists a standard set of symbols to mark cities of different size classes on a map for R yet? In a standard atlas there are symbols like small filled circles, small filled circles with an outer circle, same with small squares, etc. which mark capitals and different size

Re: [R] Fitting a model

2008-11-20 Thread Gabor Grothendieck
If you are looking for a parameteric form then a polynomial seems to work: plot(delta ~ ph) for(i in 1:4) lines(ph, fitted(lm(delta ~ poly(ph, i))), col = i, lty = i) legend(topright, legend = 1:4, col = 1:4, lty = 1:4) On Thu, Nov 20, 2008 at 6:53 AM, Dani Valverde [EMAIL PROTECTED] wrote:

[R] gam and ordination (vegan and labdsv surf and ordisurf)

2008-11-20 Thread stephen sefick
I have a general question about using thin plate splines in the surf and ordisurf routines. My rudimentary knowledge of a gam is that with each predictive variable there is a different smooth for each one and then they are added together with no real interaction term (because they don't handle

[R] Need some advice on optimization

2008-11-20 Thread Wijffels, Jan
Hi I'm quite new to optimization algorithms and I could use some advice or pointers. I'm using ?optim (method L-BFGS-B) to optimize a function over a 60-dimensional parameter space. The function itself takes about 1 to 6 minutes to compute. It finds an optimum after 6 tot 24 hours, depending

Re: [R] Calculating SD according to groups of rows

2008-11-20 Thread hadley wickham
On Thu, Nov 20, 2008 at 2:20 AM, Dieter Menne [EMAIL PROTECTED] wrote: pufftissue pufftissue pufftissue at gmail.com writes: What I am getting is indeed: 7200 23955345638934 16.39977 10.0389611.234 14.02 I'd like the final output to be: subject_id

Re: [R] Fitting a model

2008-11-20 Thread Eik Vettorazzi
you might use the drc-package (equivalently you could use nls with an appropriate selfstart model like SSlogis) library(drc) mm-drm(delta~ph,fct=LL.4()) plot(mm) From your plot I was assuming that ph is the independent variable (as modelled above) - so if you want to predict a ph from delta

[R] R on Tesla

2008-11-20 Thread Ajay ohri
Has anyone tried the R on NVidia's Tesla, the desktop supercomputing priced at 1 usd.Tesla does run on Windows 64 and 32 OS but I just wanted to check this. Regards, Ajay http://www.decisionstats.com [[alternative HTML version deleted]] __

Re: [R] extracting data from a list of unformatted text files

2008-11-20 Thread jim holtman
Here is a way to process the file. You will have to add the loop, error checking, piecing multiple files together, and determination of the end of the data: x - I give below a sample of the kind of the information in the text file : + + #(a lot of preceding text) + 2008-10-01

[R] R course in Scotland

2008-11-20 Thread Peter Saffrey
(apologies if this is the wrong list) I'm a bioinformatician looking for a course in using R, in particular the tools for working with the genome - I've heard they're lightning fast. I'm in Glasgow, but I've tried the Robertson centre for biostatistics and they use minitab. If anybody knows

Re: [R] gam and ordination (vegan and labdsv surf and ordisurf)

2008-11-20 Thread Gavin Simpson
[Have CC'd Jari here as lead author and maintainer of vegan] Hi Stephen, On Thu, 2008-11-20 at 07:41 -0500, stephen sefick wrote: I have a general question about using thin plate splines in the surf and ordisurf routines. My rudimentary knowledge of a gam is that with each predictive

Re: [R] R on Ubuntu Server

2008-11-20 Thread Daniel Høyer Iversen
Hey I have R installed om my Ubuntu server, and that works without any problems. Se http://cran.r-project.org/bin/linux/ubuntu/ for how to install R in Ubuntu (It is the same way to install it in the server edition) I connect to the server with ssh, from windows you can for example use putty.

Re: [R] R on Ubuntu Server

2008-11-20 Thread Daniel Høyer Iversen
You can start by taking a look here: https://help.ubuntu.com/8.04/serverguide/C/index.html Daniel Daniel Høyer Iversen Brøsetveien 155, 14 7050 Trondheim Mob.: 48 22 90 21 Privat: [EMAIL PROTECTED] Skole: [EMAIL PROTECTED]

[R] summary statistics into table/data base, many factors to analyse

2008-11-20 Thread Gerit Offermann
Dear list, I reduced my data to the following: x - c(1,4,2,6,8,3,4,2,4,5,1,3) y - as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2)) z - as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3)) I can produce the statistical summary just fine. s1 - tapply(x, y, summary) d1 - tapply(x, y, sd) s2 - tapply(x, z, summary) d2 -

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-20 Thread Gabor Grothendieck
Look at summaryBy in the doBy package. On Thu, Nov 20, 2008 at 9:16 AM, Gerit Offermann [EMAIL PROTECTED] wrote: Dear list, I reduced my data to the following: x - c(1,4,2,6,8,3,4,2,4,5,1,3) y - as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2)) z - as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3)) I can produce

Re: [R] R course in Scotland

2008-11-20 Thread Gustavo Carvalho
Hello, Take a look at this course: http://www.r4all.group.shef.ac.uk/index.html I don't think they teach tools for working with the genome, but it might be helpful anyway. On Thu, Nov 20, 2008 at 11:16 AM, Peter Saffrey [EMAIL PROTECTED] wrote: (apologies if this is the wrong list) I'm a

[R] binomial glm???

2008-11-20 Thread Gerard M. Keogh
Hi everyone, newbee query! I've installed R 2.8.0 and tried to run this simple glm - x is no of cars in a given year, y is the number voted in an election that year while n is the population 18+: votes - data.frame(x = c(0.62,0.77,0.71,0.74,0.77,0.86,1.13,1.44), +

Re: [R] install SPIA package on Windows

2008-11-20 Thread Erika Melissari
Hello all, I have read the suggested manuals, but I do not manage to install the SPIA package yet. I have installed Rtools28.exe following the indications, I have put the package tar.gz in c:\ directory and I have extracted it by using command window on c:\ folder and the following

Re: [R] gam and ordination (vegan and labdsv surf and ordisurf)

2008-11-20 Thread stephen sefick
#for instance this ordisurf(bug.4, env.savannah[,TSS]+env.savannah[,TIN.TP]) This is mod1? I am new to gam models, and will buy Simon's book when I have the funds. thanks for being patient Stephen Sefick (I will send you data off list if you wish with reproduvible code, but I believe that it is

Re: [R] Calculate an equation

2008-11-20 Thread stephen sefick
What have you tried so far? On Thu, Nov 20, 2008 at 7:40 AM, P.Branco [EMAIL PROTECTED] wrote: Dear all, I was wondering if you could help me with the following. I want to do calculate this equation: Ps(t)= (∑_(r=1)^N Xtr* 1/√drs)/(∑_(r=1)^N 1/√drs) Ps(t) – Probability that taxon t

Re: [R] Need some advice on optimization

2008-11-20 Thread Ben Bolker
Wijffels, Jan jan.wijffels at thomascook.be writes: Hi I'm quite new to optimization algorithms and I could use some advice or pointers. I'm using ?optim (method L-BFGS-B) to optimize a function over a 60-dimensional parameter space. The function itself takes about 1 to 6 minutes to

Re: [R] extracting data from a list of unformatted text files

2008-11-20 Thread ravi
Jim, Thank you so much. There is a lot for me here to dig into, learn and understand. But you have made my task so much easier by giving me sufficient material to get started. Once again, thanks a lot. /Ravi - Original Message From: jim holtman [EMAIL PROTECTED] To: ravi [EMAIL

Re: [R] binomial glm???

2008-11-20 Thread Ben Bolker
Gerard M. Keogh GMKeogh at justice.ie writes: Hi everyone, newbee query! I've installed R 2.8.0 and tried to run this simple glm - x is no of cars in a given year, y is the number voted in an election that year while n is the population 18+: I strongly suspect that you're

[R] Kolmogorov–Smirnov Test for Left Censored Data

2008-11-20 Thread Tom La Bone
Can someone recommend a package in R that will perform a two-sample Kolmogorov–Smirnov test on left censored data? The package surv2sample appears to offer such a test for right censored data and I guess that I can use this package if I flip my data, but I figured I would first ask if there was a

Re: [R] gam and ordination (vegan and labdsv surf and ordisurf)

2008-11-20 Thread Jari Oksanen
On Thu, 2008-11-20 at 09:45 -0500, stephen sefick wrote: #for instance this ordisurf(bug.4, env.savannah[,TSS]+env.savannah[,TIN.TP]) Stephen, According to ordisurf documentation, this is correct if 'bug.4' is an ordination result, and the sum of those two env.savannah columns is the single

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-20 Thread Jorge Ivan Velez
Dear Gerit, Here is a start using a data set which first column is numeric and the rest are factors 'f1', 'f2',,'f1381' (I'm using only 3): # Data set x - c(1,4,2,6,8,3,4,2,4,5,1,3) y - as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2)) z - as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3)) mydata=data.frame(x,y,z)

Re: [R] Calculate an equation

2008-11-20 Thread P.Branco
I tried to do some cycles using the “for” function, but then I had to make multiple “for”s and it didn’t work. One of the major problems is that I don’t know how to use the summation function on R. Best regards, P.Branco stephen sefick wrote: What have you tried so far? On Thu, Nov 20,

Re: [R] gam and ordination (vegan and labdsv surf and ordisurf)

2008-11-20 Thread Gavin Simpson
On Thu, 2008-11-20 at 09:45 -0500, stephen sefick wrote: #for instance this ordisurf(bug.4, env.savannah[,TSS]+env.savannah[,TIN.TP]) This is mod1? Hi Stephen, Yes, but it is mod1 expressed as ## the sum of TSS and TIN.TP y - env.savannah[,TSS]+env.savannah[,TIN.TP] ## sites scores from

Re: [R] error in function: nls (urgent)

2008-11-20 Thread John C Nash
Doug Bates and I have exchanged ideas on the issue of singularities in nonlinear models a number of times over the years. Both perspectives are right, and though I will characterize them as adversarial, they are really complementary. These views can be overly simplified as - if there's a

[R] Dequantizing

2008-11-20 Thread Stavros Macrakis
I have some data measured with a coarsely-quantized clock. Let's say the real data are q- sort(rexp(100,.5)) The quantized form is floor(q), so a simple quantile plot of one against the other can be calculated using: plot(q,type=l); points(floor(q),col=red) which of course shows

Re: [R] install SPIA package on Windows

2008-11-20 Thread Prof Brian Ripley
On Thu, 20 Nov 2008, Erika Melissari wrote: Hello all, I have read the suggested manuals, but I do not manage to install the SPIA package yet. I have installed Rtools28.exe following the indications, I have put the package tar.gz in c:\ directory and I have extracted it by using command

Re: [R] pdf device: rasterize portions of the plot to reduce file size

2008-11-20 Thread baptiste auguie
Thanks for your comment. I would typically follow this approach too, but I'm wondering whether one could find a more sophisticated solution. Ideally, I'd like to be able to select the text that is annotating the figure. There are very few cases where I can see a real need for raster text,

Re: [R] Calculating SD according to groups of rows

2008-11-20 Thread Dieter Menne
hadley wickham h.wickham at gmail.com writes: library(plyr) dat = data.frame(SUBJECT_ID=sample(letters[1:5],100,TRUE),HR=rnorm(100)) daply(dat,.(SUBJECT_ID),sd) ddply(dat,.(SUBJECT_ID),sd) Well that calculates sd on the whole data frame. (Like sd(dat)). Not really, it looks like the

Re: [R] How do I generate multiple (similar) objects within R?

2008-11-20 Thread Dieter Menne
Nicklas Pettersson Nicklas.Pettersson at stat.su.se writes: I wonder if anyone knows how to generate a list of objects, e.g. ten vectors with names: vect1, vect2, ... , vect10. My own idea was to use something like: for (i in 1:10) print(paste(vect, i,-NULL,sep=)) for (i in

Re: [R] Mathematica now working with Nvidia GPUs -- any plan for R?

2008-11-20 Thread Emmanuel Levy
Dear Brian, Mose, Peter and Stefan, Thanks a lot for your replies - the issues are now clearer to me. (and I apologize for not using the appropriate list). Best wishes, Emmanuel 2008/11/19 Peter Dalgaard [EMAIL PROTECTED]: Stefan Evert wrote: On 19 Nov 2008, at 07:56, Prof Brian Ripley

[R] How to Clear all variables stored in current and previous sessions

2008-11-20 Thread RON70
Is there any function in R to clear values from all variables stored in current and previous sessions? R site search do not give the desired result at all, all results are about to clear screen only not variables. Thanks, -- View this message in context:

Re: [R] Calculating SD according to groups of rows

2008-11-20 Thread hadley wickham
On Thu, Nov 20, 2008 at 10:04 AM, Dieter Menne [EMAIL PROTECTED] wrote: hadley wickham h.wickham at gmail.com writes: library(plyr) dat = data.frame(SUBJECT_ID=sample(letters[1:5],100,TRUE),HR=rnorm(100)) daply(dat,.(SUBJECT_ID),sd) ddply(dat,.(SUBJECT_ID),sd) Well that calculates sd

Re: [R] Dequantizing

2008-11-20 Thread David Winsemius
Another approach: ? jitter plot(jitter(q, factor=1),type=l) factor = 1 by default but can get increased so the spaces get filled in to your satisfaction: plot(q,type=l); points( jitter(floor(q), factor=2) ,col=red) plot(q,type=l); points( jitter(floor(q), factor=3), col=red) I suppose

[R] Error with lapply

2008-11-20 Thread megh
I have written following codes, with intention to get a list with values 1,2,9,16 : fn - function(i) return(i^2) lapply(1:4, fn, i) However I got following error : Error in FUN(1:4[[1L]], ...) : unused argument(s) (1) Can anyone please tell me what will be the correct code here? Regards, --

Re: [R] How to Clear all variables stored in current and previous sessions

2008-11-20 Thread David Winsemius
I believe that the epicalc package has a zap function that might accomplish that. -- David Winsemius On Nov 20, 2008, at 11:14 AM, RON70 wrote: Is there any function in R to clear values from all variables stored in current and previous sessions? R site search do not give the desired

Re: [R] How to Clear all variables stored in current and previous sessions

2008-11-20 Thread Prof Brian Ripley
rm(list=ls(all=TRUE)) ??remove will get you there (I don't think 'clear' is what many people would call this). RON70 wrote: Is there any function in R to clear values from all variables stored in current and previous sessions? R site search do not give the desired result at all, all results

Re: [R] Error with lapply

2008-11-20 Thread baptiste auguie
Hi, you are feeding lapply i as an optional argument, which is passed to fn() and causes an error. Just use lapply(1:4, fn), or better yet, sapply, fn - function(i) return(i^2) sapply(1:4, fn) [1] 1 4 9 16 Hope this helps, baptiste On 20 Nov 2008, at 16:31, megh wrote: I have

Re: [R] Error with lapply

2008-11-20 Thread Marc Schwartz
on 11/20/2008 10:31 AM megh wrote: I have written following codes, with intention to get a list with values 1,2,9,16 : fn - function(i) return(i^2) lapply(1:4, fn, i) However I got following error : Error in FUN(1:4[[1L]], ...) : unused argument(s) (1) Can anyone please tell me what

Re: [R] [Obo-relations] Discussion summary on original biological parts

2008-11-20 Thread Wacek Kusnierczyk
[EMAIL PROTECTED] wrote: A canonical human body will have canonical parts and those canonical parts will have canonical subparts and so on. ... and? Can't think of anyone who would fit that description. is this considered an argument for that there cannot possibly an instance of the

[R] Removing rows with rowsums==0 (I can't figure this out)

2008-11-20 Thread stephen sefick
##I want to remove the rows where the row sums are zero and this is as far as I have gotten ffg - (structure(list(CD = c(0, 0, 0, 0, 3.125, 0, 0, 0, 0, 1.6, 3.125, 0, 0, 6.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, 0, 0,

Re: [R] Error with lapply

2008-11-20 Thread Gabor Grothendieck
lapply already passes the first arg to fn and by specifying the i (which is undefined -- its only defined within fn) it would be trying to to pass a second arg to fn yet fn takes only takes one arg. Try these: lapply(1:4, fn) lapply(1:4, ^, 2) On Thu, Nov 20, 2008 at 11:31 AM, megh [EMAIL

Re: [R] Error with lapply

2008-11-20 Thread Bert Gunter
To be clear, the problem is not the return statement in your function, but the extra argument, i, in your lapply statement: lapply(1:4,fn) works just fine with your original function. You need to read ?lapply more carefully: fn receives the values of the first argument (1:4) in turn

Re: [R] Removing rows with rowsums==0 (I can't figure this out)

2008-11-20 Thread Gavin Simpson
On Thu, 2008-11-20 at 12:01 -0500, stephen sefick wrote: ##I want to remove the rows where the row sums are zero and this is as far as I have gotten Given your ffg, ## the which() call returns row indices for rows with rowSum 0 ffg[which(rowSums(ffg) 0, ] does the trick HTH G ffg -

[R] classification accuracy in logistic regression

2008-11-20 Thread David Kaplan
Hi all, I'm looking for a program that will take the predicted probabilities from a logistic regression using glm{stats}, dichotomize them according to a threshold that I can control, and then use them to form sensitivity, specificity, false pos and false neg rates. Thanks in advance.

[R] Odp: Removing rows with rowsums==0 (I can't figure this out)

2008-11-20 Thread Petr PIKAL
Hi something like ffg[!rowSums(ffg)==0,] Petr Pikal [EMAIL PROTECTED] 724008364, 581252140, 581252257 [EMAIL PROTECTED] napsal dne 20.11.2008 18:01:28: ##I want to remove the rows where the row sums are zero and this is as far as I have gotten ffg - (structure(list(CD = c(0, 0, 0, 0,

Re: [R] Dequantizing

2008-11-20 Thread Greg Snow
The logspline package has tools for estimating a density function for interval censored data (the old methods), you could use those to estimate the density of your data, then compare that density to the theoretical density. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

Re: [R] Set of standard city size symbols as known from atlases?

2008-11-20 Thread Greg Snow
I don't know of an existing set of symbols for this, but if you can come up with a set or descriptions of what you want, then the my.symbols function in the TeachingDemos package can be used to place them on a plot. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

Re: [R] Calculate an equation

2008-11-20 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 20.11.2008 16:15:44: I tried to do some cycles using the ?for? function, but then I had to make multiple ?for?s and it didn?t work. One of the major problems is that I don?t know how to use the summation function on R. I did not find function summation.

Re: [R] Dequantizing

2008-11-20 Thread Richard . Cotton
I have some data measured with a coarsely-quantized clock. Let's say the real data are q- sort(rexp(100,.5)) The quantized form is floor(q), so a simple quantile plot of one against the other can be calculated using: plot(q,type=l); points(floor(q),col=red) which of

Re: [R] Dequantizing

2008-11-20 Thread roger koenker
I'm rather doubtful that you can improve on the uniform jittering strategy you originally considered. It would require intimate knowledge about the non-uniformity of the density in the spacings between your quantized version. But if you really _knew_ the parent distribution then something

Re: [R] Removing rows with rowsums==0 (I can't figure this out)

2008-11-20 Thread Gavin Simpson
On Thu, 2008-11-20 at 17:08 +, Gavin Simpson wrote: On Thu, 2008-11-20 at 12:01 -0500, stephen sefick wrote: ##I want to remove the rows where the row sums are zero and this is as far as I have gotten Given your ffg, ## the which() call returns row indices for rows with rowSum 0

Re: [R] sub / gsub - extracting between identical symbols

2008-11-20 Thread Daniel Malter
Thanks. Daniel - cuncta stricte discussurus - _ Von: Henrique Dallazuanna [mailto:[EMAIL PROTECTED] Gesendet: Thursday, November 20, 2008 5:18 AM An: Daniel Malter Cc: [EMAIL PROTECTED] Betreff: Re: [R] sub / gsub - extracting

Re: [R] classification accuracy in logistic regression

2008-11-20 Thread Achim Zeileis
On Thu, 20 Nov 2008, David Kaplan wrote: Hi all, I'm looking for a program that will take the predicted probabilities from a logistic regression using glm{stats}, dichotomize them according to a threshold that I can control, and then use them to form sensitivity, specificity, false pos and

Re: [R] Fitting a model

2008-11-20 Thread Dani Valverde
Thank you all for your answers. If you look at the plot resulting from my data, it seems that it is some kind of sigmoid function, not only polynomial. How could I fit it? Best, Dani Daniel Valverde Saubí Grup de Biologia Molecular de Llevats Facultat de Veterinària de la Universitat

Re: [R] Removing rows with rowsums==0 (I can't figure this out)

2008-11-20 Thread Sarah Goslee
On Thu, Nov 20, 2008 at 12:28 PM, Gavin Simpson [EMAIL PROTECTED] wrote: But Prof. Ripley has pointed out (off list) that ffg[rowSums(ffg) 0, ] I suggested much the same solution off-list (using apply rather than rowSums, as I'm apparently incapable of remembering the existence of the

Re: [R] classification accuracy in logistic regression

2008-11-20 Thread Frank E Harrell Jr
Achim Zeileis wrote: On Thu, 20 Nov 2008, David Kaplan wrote: Hi all, I'm looking for a program that will take the predicted probabilities from a logistic regression using glm{stats}, dichotomize them according to a threshold that I can control, and then use them to form sensitivity,

[R] more color choice with heatmap.2

2008-11-20 Thread Liu, Hao [CNTUS]
Dear All: I have a question on how to get more choices of color to show gene expression up or down regulation, like choosing the neutral color as yellow, any way to work with the color transition? I could not find any reference on those. Thanks for your help Hao [[alternative

Re: [R] more color choice with heatmap.2

2008-11-20 Thread jim holtman
?colorRamp On Thu, Nov 20, 2008 at 2:51 PM, Liu, Hao [CNTUS] [EMAIL PROTECTED] wrote: Dear All: I have a question on how to get more choices of color to show gene expression up or down regulation, like choosing the neutral color as yellow, any way to work with the color transition? I

Re: [R] [Obo-relations] Discussion summary on original biological parts

2008-11-20 Thread [EMAIL PROTECTED]
On Thu, 20 Nov 2008, Wacek Kusnierczyk wrote: [EMAIL PROTECTED] wrote: So what exactly is your understanding of a canonical entity and perhaps that'd clarify your point? when i studied medicine, i used to think about 'canonical' anatomy (well, we'd just speak of human anatomy, with no

[R] convert factors to numbers

2008-11-20 Thread thoeb
Hello, I have a problem with reading a csv-file. One colum of the inputfile consists of characters and numbers. After reading the csv-file I create a new dataframe by dividing the values of that colum into more colums (then a colum contains just characters or numbers) but the numbers are

[R] align two lattice plots using grid

2008-11-20 Thread baptiste auguie
Dear list, I'm trying to get two lattice plots aligned on a page. They should share a common x axis, hence the need for perfect alignment, but the data is taken from unrelated, separate sources (it is therefore inappropriate to combine them and use facetting to get an automatic layout:

[R] Vector lty argrument for lines or plot

2008-11-20 Thread Brian Diggs
I am confused by the behavior of the lines function when the lty argument is a vector. ?lines indicates that lty is a valid parameter, but says nothing else about it. ?plot.xy (which I think is what gets called) refers back to ?lines. ?plot.default says to see ?par. In ?par, about lty it

[R] Identify command in R

2008-11-20 Thread David Kaplan
Hi all, In using the identify command, I get the following message plot(hatvalues(scireg3)) abline(h=.0154,lty=2) # plots a reference line at (k + 1)/n identify(1:1165, hatvalues(scireg3),row.names(sciach)) Error in xy.coords(x, y) : 'x' and 'y' lengths differ which doesn't allow me to

Re: [R] Checking collinearity using lmer

2008-11-20 Thread Crystal McRae
I tried vif()...but I can only get it to run with lm and glm. Is there a way to run vif() with lmer() or glmmPQL()? Or is there another way to check for collinearity between parameters while taking a random effect into account? Date: Wed, 19 Nov 2008 23:26:53 -0300 From: [EMAIL PROTECTED]

[R] Reformatting a table

2008-11-20 Thread Tul Gan
Hi !    I am new to R. Can somebody help me in reformatting huge output files ,i.e, rearranging sets of columns in specific order. For example: I have data for three compunds 1, 2 and 3 file1: ID CA1 CA3 CA2 MA2 MA1 MA3 1 14 15 13 7 12 3 2 19 7 12 10 14 5 3 21 12 19 6 8 9   to File

Re: [R] convert factors to numbers

2008-11-20 Thread jim holtman
FAQ 7.10 or use colClasses to define your input On Thu, Nov 20, 2008 at 3:12 PM, thoeb [EMAIL PROTECTED] wrote: Hello, I have a problem with reading a csv-file. One colum of the inputfile consists of characters and numbers. After reading the csv-file I create a new dataframe by dividing the

Re: [R] [Obo-relations] Discussion summary on original biological parts

2008-11-20 Thread Wacek Kusnierczyk
nothing at all! i have incidentally posted to the wrong list. apologies. vQ David Winsemius wrote: What does this have to do with R? -- David Winsemius Heritage Labs On Nov 20, 2008, at 2:45 PM, [EMAIL PROTECTED] wrote: (...) __

[R] syntax and package for generalized linear mixed models

2008-11-20 Thread Jeff Evans
Hi All, I am making the switch to R and uncertain which of the several packages for mixed models is appropriate for my analysis. I am waiting for Pinheiro and Bates' book to arrive via inter-library loan, but it will be a week or more before it arrives. I am trying to fit a generalized

Re: [R] Identify command in R

2008-11-20 Thread Barry Rowlingson
2008/11/20 David Kaplan [EMAIL PROTECTED]: Hi all, In using the identify command, I get the following message plot(hatvalues(scireg3)) abline(h=.0154,lty=2) # plots a reference line at (k + 1)/n identify(1:1165, hatvalues(scireg3),row.names(sciach)) Error in xy.coords(x, y) : 'x' and 'y'

Re: [R] Identify command in R

2008-11-20 Thread Rolf Turner
On 21/11/2008, at 9:19 AM, David Kaplan wrote: Hi all, In using the identify command, I get the following message plot(hatvalues(scireg3)) abline(h=.0154,lty=2) # plots a reference line at (k + 1)/n identify(1:1165, hatvalues(scireg3),row.names(sciach)) Error in xy.coords(x, y) : 'x' and

Re: [R] Fitting a model

2008-11-20 Thread Eik Vettorazzi
Actually drm as posted before fits a sigmoid curve (a generalized logistic function with 4 parameters, see ?LL.4), so I didn't get the point of your new question. Dani Valverde schrieb: Thank you all for your answers. If you look at the plot resulting from my data, it seems that it is some

  1   2   >