Re: [R] Average of Two Matrices

2008-06-25 Thread Peng Jiang
Hi, Gundala pretty much u can do is adding them directly , that is , treat them like two numbers instead of matrix. z - (x+y)/2 . Is that what u want ? or u have another meaning. regards On 2008-6-25, at 上午10:19, Gundala Viswanath wrote: Hi, I have two matrices x and y (same

[R] tiff()-bug (was re:Preparing high quality figures with tiff as end result)

2008-06-25 Thread Gustaf Rydevik
Hi all, A while back I sent a message concerning working with tiff-files, and mentioned that I encountered a bug in 2.7.0. This bug still occurs in 2.7.1, and is reproducable on a separate computer (both running WinXP professional): tiff() plot(1:1000) dev.off() This causes R to show the window

Re: [R] tiff()-bug (was re:Preparing high quality figures with tiff as end result)

2008-06-25 Thread Uwe Ligges
Gustaf Rydevik wrote: Hi all, A while back I sent a message concerning working with tiff-files, and mentioned that I encountered a bug in 2.7.0. This bug still occurs in 2.7.1, and is reproducable on a separate computer (both running WinXP professional): tiff() plot(1:1000) dev.off() This

Re: [R] heatmap and continuous variable

2008-06-25 Thread Hans-Ulrich Klein
Gregory Warnes wrote: Hello Hans, Do you need *both* a categorical *and* a continuous variable, or just a continuous variable? -Greg Hello Greg, I want to visualize survival data above the columns. So my continuous variable is follow up time and my categorical variable indicates the

Re: [R] tiff()-bug (was re:Preparing high quality figures with tiff as end result)

2008-06-25 Thread Gustaf Rydevik
On Wed, Jun 25, 2008 at 10:16 AM, Uwe Ligges [EMAIL PROTECTED] wrote: Gustaf Rydevik wrote: Hi all, A while back I sent a message concerning working with tiff-files, and mentioned that I encountered a bug in 2.7.0. This bug still occurs in 2.7.1, and is reproducable on a separate

Re: [R] tiff()-bug (was re:Preparing high quality figures with tiff as end result)

2008-06-25 Thread Peng Jiang
Hi , Gustaf i don't know why but it works pretty well on a mac. regards . On 2008-6-25, at 下午4:16, Uwe Ligges wrote: Gustaf Rydevik wrote: Hi all, A while back I sent a message concerning working with tiff-files, and mentioned that I encountered a bug in 2.7.0. This bug still occurs in

Re: [R] How to solve empty cells in the contingency table?

2008-06-25 Thread Peng Jiang
Hi , yan I don't think that is a R specific problem. Treating missing value is not that trivial, it depends too much on your raw data and your essential problem. regards. On 2008-6-25, at 上午2:14, 程燕 wrote: Hi,Dear all R experts, I am trying to do the 2-way contingency table

Re: [R] running R-code outside of R

2008-06-25 Thread [EMAIL PROTECTED]
On 25 июн, 09:28, Jim Porzak [EMAIL PROTECTED] wrote: The user of your R script sees only the outputs you create. The R source is hidden. But you may expose R sources via the web server if you wish. Andrey __ R-help@r-project.org mailing list

[R] avoid using Dingbats symbols for points()

2008-06-25 Thread Hans-Joerg Bibiko
Hi, I came across with a tiny problem. E.g.: pdf() plot(1:5) points(2, 3, cex=10, pch=21, bg=grey, lwd=0.3) points(2, 4, cex=1, pch=21, bg=grey, lwd=0.3) dev.off() If I execute this I'll get a nice PDF. Fine. But I want to edit this PDF with let's say by using Adobe Illustrator. If I try

Re: [R] changing scale range after an axis break

2008-06-25 Thread Jim Lemon
On Tue, 2008-06-24 at 11:39 -0300, Megan J Bellamy wrote: Hello, I am constructing a boxplot but have a very wide range of values (zero - ~28000). I have placed an axis break at the 8000 mark but would like to have a different scale above the break that ranges from 8000-28000. Right now my

[R] Odp: a loop....

2008-06-25 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 25.06.2008 10:24:35: I'm trying to make a loopo with some file library(dplR) files.rwl - system(ls *.rwl, intern=TRUE) files.rwl [1] cimfasy.rwl rocquce.rwl for (i in files.rwl) assign(gsub(\\.rwl$, _rwl, i), read.rwl(i, header=0)) There are 70

[R] weighted inverse chi-square method for combining p-values

2008-06-25 Thread Andreas Cederfeldt
Hi, This is more of a general question than a pure R one, but I hope that is OK. I want to combine one-tailed independent p-values using the weighted version of fisher's inverse chi-square method. The unweighted version is pretty straightforward to implement. If x is a vector with p-values, then

Re: [R] weighted inverse chi-square method for combining p-values

2008-06-25 Thread Patrick Burns
Are you sure you want to use Fisher's method? http://www.burns-stat.com/pages/Working/perfmeasrandport.pdf page 13 shows an example where Fisher's method is not attractive, but Stouffer's method gives reasonable results. Weighting in Stouffer's method is straightforward. Patrick Burns [EMAIL

Re: [R] weighted inverse chi-square method for combining p-values

2008-06-25 Thread Andreas Cederfeldt
Hi Patrick, I have actually read your paper before and I am aware of the objection. I have also implemented the weighted Stouffer's in R. I nevertheless want to try the weighted fisher's if possible (if for no other reason than curiosity) Andreas Cederfeldt On Wed, Jun 25, 2008 at 12:53 PM,

Re: [R] spineplot (graphics package): how to control font size?

2008-06-25 Thread Mark Difford
Hi Paul, Duncan has shown you how to do it. There is often a simpler route that is worth knowing about. Whether it works depends on how the function was coded. In this case it works: ## Example par(cex.main = 3) spineplot (table (tbl$DAY, tbl$SEX), main='TIPS') par(cex.main = 1.2) spineplot

Re: [R] Dynamically switching lattice device characteristics in Sweave under Makefile control

2008-06-25 Thread Douglas Bates
On Tue, Jun 24, 2008 at 7:43 PM, Deepayan Sarkar [EMAIL PROTECTED] wrote: On 6/24/08, Douglas Bates [EMAIL PROTECTED] wrote: I am indebted to Deepayan Sarkar for lattice graphics, Fritz Leisch for Sweave and the authors of the beamer package for LaTeX. For me these are a killer app

[R] I want to install a package on Max OS X from a local file

2008-06-25 Thread stephen sefick
I can't figure this one out- I am the administrator, The file that I want to install is a .tar.gz which is located on my desktop. How do I get it into my packages directory- through the GUI or through brute force? thanks stephen -- Let's not spend our time and resources thinking about things

[R] gap.boxplot error message?

2008-06-25 Thread Megan J Bellamy
Hello, When I put in the following script line: gap.boxplot(CLI3, CLI4, CLI5, CLI6, CLI7, gap=list(top=c(8000,28), bottom=c(0,250)), range=50, outline=TRUE, par(ask=FALSE) I get a '+' telling me I am missing something. I have tried adding ')', 'width=NULL', etc and then I get this error:

Re: [R] I want to install a package on Max OS X from a local file

2008-06-25 Thread stephen sefick
install.packages(file.choose(), repos=NULL) thought this would work, but it didn't the package is the sowas package - this doesn't seem to be a CRAN package, and it can be found at : http://tocsy.agnld.uni-potsdam.de/wavelets/ On Wed, Jun 25, 2008 at 8:25 AM, stephen sefick [EMAIL PROTECTED]

Re: [R] gap.boxplot error message?

2008-06-25 Thread stephen sefick
the par(ask=FALSE) doesn't belong in the code (I think). gap.boxplot(CLI3, CLI4, CLI5, CLI6, CLI7, gap=list(top=c(8000,28), bottom=c(0,250)), range=50, outline=TRUE) but I haven't tried this. Stephen On Wed, Jun 25, 2008 at 10:49 AM, Megan J Bellamy [EMAIL PROTECTED] wrote: Hello, When I

[R] Problems with Cairo-installation

2008-06-25 Thread Mag. Ferri Leberl
Dear Everybody, install.packages(Cairo) returns [...] * Installing *source* package 'Cairo' ... checking for gcc... gcc-4.2 -std=gnu99 checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. ERROR: configuration

Re: [R] logistic regression

2008-06-25 Thread Mikhail Spivakov
Just a small correction to my previous reply. I meant to say probabilities of success for each type add up to one. thanks Frank for noticing the mistake. Bill.Venables wrote: It looks like A*B*C*D is a complete, totally saturated model, (the residual deviance is effectively zero, and the

Re: [R] I want to install a package on Max OS X from a local file

2008-06-25 Thread Richard Pearson
From the (terminal window) command line try: R CMD INSTALL path.to.file/filename.tar.gz Does that do it? Richard stephen sefick wrote: install.packages(file.choose(), repos=NULL) thought this would work, but it didn't the package is the sowas package - this doesn't seem to be a CRAN

Re: [R] I want to install a package on Max OS X from a local file

2008-06-25 Thread stephen sefick
no it didn't- am I missing something (Mac OS X 10.5.3, R 2.7) new-host-3:~ sefick$ R CMD INSTALL /Users/Desktop/sowas.tar.gz WARNING: invalid package '/Users/Desktop/sowas.tar.gz' * Installing to library '/Library/Frameworks/R.framework/Resources/library' ERROR: no packages specified On Wed,

Re: [R] gap.boxplot error message?

2008-06-25 Thread Megan J Bellamy
Hi Stephen, I tried what you suggested and got a different error message instead... any ideas? gap.boxplot(CLI3, CLI4, CLI5, CLI6, CLI7, gap=list(top=c(8000,28), bottom=c(0,250)), range=50, outline=TRUE) Error in bxgap$out[bxgap$out gap$top[2]] - bxgap$out[bxgap$out gap$top[2]] - :

Re: [R] gap.boxplot error message?

2008-06-25 Thread stephen sefick
is there an na.rm argument in gap.boxplot? On Wed, Jun 25, 2008 at 11:24 AM, Megan J Bellamy [EMAIL PROTECTED] wrote: Hi Stephen, I tried what you suggested and got a different error message instead... any ideas? gap.boxplot(CLI3, CLI4, CLI5, CLI6, CLI7, gap=list(top=c(8000,28),

Re: [R] tiff()-bug (was re:Preparing high quality figures with tiff as end result)

2008-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2008, Peng Jiang wrote: Hi , Gustaf i don't know why but it works pretty well on a mac. with completely different code. Gustaf Rydevik has mentioned this before -- it never fails for me on Windows and hence one would not expect there to be a change in 2.7.1. Only if someone

Re: [R] avoid using Dingbats symbols for points()

2008-06-25 Thread Prof Brian Ripley
Please look at the NEWS for R-devel, which was an option to work around this known bug in Adobe Illustrator. (Of course, the R posting guide suggested this for before posting.) On Wed, 25 Jun 2008, Hans-Joerg Bibiko wrote: Hi, I came across with a tiny problem. E.g.: pdf() plot(1:5)

Re: [R] I want to install a package on Max OS X from a local file

2008-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2008, stephen sefick wrote: install.packages(file.choose(), repos=NULL) thought this would work, but it didn't the package is the sowas package - this doesn't seem to be a CRAN package, and it can be found at : You forgot a lot of things asked for in the posting guide, but if

Re: [R] gap.boxplot error message?

2008-06-25 Thread Megan J Bellamy
I don't believe so. Sorry if I am missing something (I am a beginner user of R). I tried just putting in all the defaults as see on http://bm2.genes.nig.ac.jp/RGM2/R_current/library/plotrix/man/gap.boxplot.html Here is a copy of my script and how the graph looks right now (without the break

Re: [R] tiff()-bug (was re:Preparing high quality figures with tiff as end result)

2008-06-25 Thread Gustaf Rydevik
A short update that may be of help: The snippet of code does not crash R if i run under vanilla, nor if I change R to MDI-mode. It does crash R infallibly if I set it to SDI-mode in the Rprofile file. Strange... /Gustaf On Wed, Jun 25, 2008 at 3:16 PM, Prof Brian Ripley [EMAIL PROTECTED]

Re: [R] avoid using Dingbats symbols for points()

2008-06-25 Thread Hans-Joerg Bibiko
On 25 Jun 2008, at 15:22, Prof Brian Ripley wrote: Please look at the NEWS for R-devel, which was an option to work around this known bug in Adobe Illustrator. Thanks a lot for the hint. (Of course, the R posting guide suggested this for before posting.) I looked at several mailing

Re: [R] I want to install a package on Max OS X from a local file

2008-06-25 Thread stephen sefick
Macintosh OS X 10.5.3 R version 2.7 (binary distribution) #I tried this in R install.packages(file.choose(), repos=NULL, type=source) WARNING: omitting pointless dependence on 'R' without a version requirement Warning message: In install.packages(file.choose(), repos = NULL, type = source) :

Re: [R] running R-code outside of R

2008-06-25 Thread Esmail Bonakdarian
Jim Porzak wrote: The user of your R script sees only the outputs you create. The R source is hidden. Ah .. that sounds great .. I wish I had known about this a month ago! I'll have to check it out - thanks! Esmail HTH, Jim Porzak .. Would the R script that is being run be hidden from

Re: [R] persp plot

2008-06-25 Thread Ben Bolker
Chad Junkermeier junkermeier at byu.edu writes: I have a set of data in the form x1, y1, z1 x1, y2, z2 ... x1, yN, zN x2, y1, z(N+1) x2, y2, z(N+2) ... x2, yN, z(2N) ...and so on... xM, yN, val(M*N) Do you have any suggestions? Not at all carefully tested, but: ## make up

Re: [R] T and P Statistics

2008-06-25 Thread ONKELINX, Thierry
If you would have tried help.search(t-test) It would have listed the function t.test() ?t.test Will give you the helpfile with instructions. ir. Thierry Onkelinx Instituut voor natuur- en

[R] Working with R in a Excel VBA

2008-06-25 Thread Freezer
Hello EveryBody, I have some problems to connect R with Excel. It there somebody can help me to understand how to proceed. See you very soon -- View this message in context: http://www.nabble.com/Working-with-R-in-a-Excel-VBA-tp18109068p18109068.html Sent from the R help mailing list archive

[R] xyplot questions - axis and plotting two things in same panel

2008-06-25 Thread Karin Lagesen
Hi list! I am trying to use xyplot to plot some graphs. The data I have looks like this: alldata[1:10,] breaks numbers moltypetype 1 0.0006598 5S Between species 2 0.407 0 5S Between species 3 0.8135228 5S Between species 4

[R] help_transformation

2008-06-25 Thread Indermaur Lukas
heya, i am fitting linear mixed effect model to a response Y. Y shows an s-shaped distribution when using QQ-plots (some zero values and some very high values). hence, which transformation should i apply that Y follows a normal distribution? any r-function/package available to do this? thanks

[R] Extract naiveBayes details

2008-06-25 Thread stephanos
Hey, I just like to know how to extract details from the naiveBayes model (package e1071). I mean, for each possible value the model defines how much it influences the outcome. I want to sort those probabilities and show the values with the highest impact. How could I do that? PS: I tried using

Re: [R] Accessing Named Column in a Matrix

2008-06-25 Thread Kenn Konstabel
On Mon, Jun 23, 2008 at 9:12 PM, Gundala Viswanath [EMAIL PROTECTED] wrote: I've also tried with data$var But still fail to access var column you can't use $ with matrices (see help($) !), but you can use [ with names, or convert you matrix to a data frame: myData[, var]

Re: [R] loop with files

2008-06-25 Thread Monica Pisica
Hi, I am not sure this is what you want …. But alist - list.files(path = whatever path you have for your files, full.names = TRUE) Now you have a list with the names of your files …. Form each name you can make a variable name and assign that file …. fname - substring(alist[i], first,

[R] Memory allocation failed: Copying Node

2008-06-25 Thread ppatel3026
Following code bugs with Memory allocation failed: Copying Node error after parsing n thousand files. I have included the main code(below) and functions(after the main code). I am not sure which lines are causing the copying Node which results in memory failure. Please advise. #Beginning

Re: [R] running R-code outside of R

2008-06-25 Thread Spencer Graves
If you want to hide the fact that you are using R -- especially if you charge people for your software that uses R clandestinely -- that's a violation of the license (GPL). I doubt if anyone associated with R would bother with a lawsuit, but a competitor who offers related software

Re: [R] a loop....

2008-06-25 Thread Alfredo Alessandrini
I recommend avoid loop in this case I'm working with many files... I must utilise a loop necessarily. And you shall know that R is pretty smart in handling missing values. How do you know after change NA - 0 that 0 is from NA and not like in 1994 row and second column. This isn't a

Re: [R] tiff()-bug (was re:Preparing high quality figures with, tiff as end result)

2008-06-25 Thread Paulo Barata
To the R colleagues, I do not have any problems when running this code, everything works well: tiff() plot(1:1000) dev.off() I am using R 2.7.1 and Windows XP Professional (service pack 2). Regards, Paulo Barata --- Paulo

Re: [R] tiff()-bug (was re:Preparing high quality figures

2008-06-25 Thread Monica Pisica
Hi, I don't know if this matters but it worked for me with no problems …. sessionInfo() R version 2.7.0 (2008-04-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United

[R] subscripted assignments errormessage in gap.boxpot

2008-06-25 Thread Megan J Bellamy
I am trying to create a boxplot that has a gap with different scales so that my boxes actually show (compare attachments). I have referred to the help pages for gap.boxplot, gap.plot, list with no luck so far. Here is my script and the resulting error message: # Import *.csv files containing

Re: [R] running R-code outside of R

2008-06-25 Thread Michael Conklin
Spencer Graves wrote: If you want to hide the fact that you are using R -- especially if you charge people for your software that uses R clandestinely -- that's a violation of the license (GPL). I doubt if anyone associated with R would bother with a lawsuit, but a competitor who offers

Re: [R] T and P Statistics

2008-06-25 Thread Thomas Kaliwe
Hi, help(t.test) x = rnorm(10, mean = 10, sd = 1) #some data mytest = t.test(x, mu = 10) #is mu = 10 attributes(mytest) #what's in the test mytest$p.value #obtain the p-value mytest$statistic #obtain the t-value aka statistic HTH Thomas

[R] confidence bounds using contour plot

2008-06-25 Thread Pascal Hänggi
Hello I'm trying to calculate 2d confindence bounds into a scatterplot using the function kde2d (package MASS) and a contour plot. I found a similar post providing a solution - unfortunatly I do not realy understand which data I have to use to calculated the named quantile: Post URL:

Re: [R] running R-code outside of R

2008-06-25 Thread Gabor Csardi
Some clarifications. R's license (GPL v2) is not about money, you can charge anyone as much as you wish. If you create an R program (and don't modify R itself), then you can distribute that program according to any license you wish. If you modify R itself _and_ distribute the modified

Re: [R] running R-code outside of R

2008-06-25 Thread Ramon Diaz-Uriarte
I am not an expert nor a lawyer but ... On Wed, Jun 25, 2008 at 5:28 PM, Michael Conklin [EMAIL PROTECTED] wrote: Spencer Graves wrote: If you want to hide the fact that you are using R -- especially if you charge people for your software that uses R clandestinely -- that's a violation

[R] unstructured correlation matrix in lme

2008-06-25 Thread David Hajage
Hello R users, I'm student and I'm actually having a lecture introducing repeated mesures analysis. Unfortunately, all examples use SAS system... I'm working with lme function (package nlme), and I'm using extract.lme.cov (package mgcv) to extract covariance structure of models. One example is

Re: [R] Need ideas on how to show spikes in my data and how to code it in R

2008-06-25 Thread Daniel Folkinshteyn
I don't understand this. Why not just get hist() to plot on the density scale, thereby making its output commensurate with the output of density()? The hist() function will plot on the density scale if you ask it to. Set freq=FALSE (or prob=TRUE) in the call to hist.

Re: [R] unstructured correlation matrix in lme

2008-06-25 Thread David Hajage
I would like to make clear that the SAS unstructured correlation matrix in the second model was : Estimated R Correlation Matrix for id 1 1 1. 0.8575 0.6984 0.4657 0.3165 2 0.8575 1. 0.8557 0.5670 0.4039 3 0.6984 0.8557

[R] LDA on pre-assigned training and testing data sets

2008-06-25 Thread Peter Flom
Dear r-help I am trying to run LDA on a training data set, and test it on another data set with the same variables. I found examples using crossvalidation, and using training and testing data sets set up with sample, but not when they are preassigned. Here is what I tried # FIRST SET UP A

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Marc Schwartz
on 06/25/2008 11:19 AM Daren Tan wrote: unique(c(1:10,1)) gives 1:10 (i.e. unique values), is there any method to get only 2:10 (i.e. values that are unique) ? The easiest might be: Vec [1] 1 2 3 4 5 6 7 8 9 10 1 Vec[table(Vec) == 1] [1] 2 3 4 5 6 7 8 9 10 HTH, Marc

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Marc Schwartz
on 06/25/2008 11:29 AM Marc Schwartz wrote: on 06/25/2008 11:19 AM Daren Tan wrote: unique(c(1:10,1)) gives 1:10 (i.e. unique values), is there any method to get only 2:10 (i.e. values that are unique) ? The easiest might be: Vec [1] 1 2 3 4 5 6 7 8 9 10 1 Vec[table(Vec) ==

Re: [R] LDA on pre-assigned training and testing data sets

2008-06-25 Thread Michael Conklin
I think this line mafdiscpred - predict(mafdisc, data = test) needs to be mafdiscpred - predict(mafdisc, newdata = test) Michael Conklin Chief Methodologist - Advanced Analytics MarketTools, Inc. 6465 Wayzata Blvd. Suite 170 Minneapolis, MN 55426 Tel: 952.417.4719 |

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Gabor Csardi
Hmmm, this is not very good: Vec - c(10:1,1) Vec[ table(Vec) == 1 ] [1] 9 8 7 6 5 4 3 2 1 and these are obviously not the unique values. This one is better: Vec [ ! duplicated(Vec) ! duplicated(Vec, fromLast=TRUE) ] Gabor On Wed, Jun 25, 2008 at 11:29:31AM -0500, Marc Schwartz wrote:

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2008, Marc Schwartz wrote: on 06/25/2008 11:19 AM Daren Tan wrote: unique(c(1:10,1)) gives 1:10 (i.e. unique values), is there any method to get only 2:10 (i.e. values that are unique) ? The easiest might be: Vec [1] 1 2 3 4 5 6 7 8 9 10 1 Vec[table(Vec) == 1]

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Gabor Csardi
I'm sorry to say, but this one is wrong, too. Maybe coffee really helps, I just had one. :) Vec - c(20:30,20) which(table(Vec) == 1) 21 22 23 24 25 26 27 28 29 30 2 3 4 5 6 7 8 9 10 11 You would actually need the names, but that would involve some numberic - character - numeric

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Marc Schwartz
on 06/25/2008 11:44 AM Gabor Csardi wrote: I'm sorry to say, but this one is wrong, too. Maybe coffee really helps, I just had one. :) Vec - c(20:30,20) which(table(Vec) == 1) 21 22 23 24 25 26 27 28 29 30 2 3 4 5 6 7 8 9 10 11 You would actually need the names, but that would

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Gabor Grothendieck
On Wed, Jun 25, 2008 at 12:19 PM, Daren Tan [EMAIL PROTECTED] wrote: unique(c(1:10,1)) gives 1:10 (i.e. unique values), is there any method to get only 2:10 (i.e. values that are unique) ? Try this: setdiff(x, x[duplicated(x)]) __

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Gabor Csardi
Wow, that is smart, although is seems to be overkill. I guess 'duplicated' is better than O(n^2), is it really? Gabor On Wed, Jun 25, 2008 at 05:43:30PM +0100, Prof Brian Ripley wrote: On Wed, 25 Jun 2008, Marc Schwartz wrote: on 06/25/2008 11:19 AM Daren Tan wrote: unique(c(1:10,1))

Re: [R] running R-code outside of R

2008-06-25 Thread Esmail Bonakdarian
Spencer Graves wrote: If you want to hide the fact that you are using R -- especially if you charge people for your software that uses R clandestinely -- that's a violation of the license (GPL). No on both accounts .. but thanks for pointing this out none the less.

Re: [R] selecting values that are unique, instead of selecting unique values

2008-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2008, Gabor Csardi wrote: Wow, that is smart, although is seems to be overkill. I guess 'duplicated' is better than O(n^2), is it really? Yes as it hashes, but the overhead on short vectors is high since it always hashes. Gabor On Wed, Jun 25, 2008 at 05:43:30PM

[R] expression, strsplit, ...

2008-06-25 Thread baptiste Auguié
DeaR list, I'm a bit lost in the behavior of substitute and co. I often use fairly long axis labels in my graphs (long to write, that is). Typically, they would contain some greek letters and units with exponents, as in: xlab=expression(paste(text , alpha, / , V,., m^{-3}, ., kg^{-2},

Re: [R] stringdot

2008-06-25 Thread Nair, Murlidharan T
I tried the following data(promotergene) ## train svm using custom kernel stringkernel-stringdot(length = 4, lambda = 0.5, type = sequence, normalized = TRUE) gene - ksvm(Class~.,data=promotergene,kernel=stringkernel,C=10,cross=5) I get the following error cannot allocate vector of size 1.2

[R] data frame manipulation - splitting monitoring interval and assigning stage

2008-06-25 Thread Jessi Brown
Hello, everyone. I'm hoping to prevent myself from doing a lot of pointing and clicking in Excel. I have a dataframe of bird nest check observations, in which I know the date of the first check, the date of the second check (both currently in Julian date format), the status of the nest at the

[R] rearrange data

2008-06-25 Thread Stefan Uhmann
Dear HelpeRs, i have a data.frame df as follows: df - data.frame(id=rep(1:3,rep(10,3)), emoqu=as.factor(rep(c(0,0,1,1,2,2,3,3,4,4),3)), x=rnorm(30), y=runif(30)) Now, I would like to rearrange the data and it works - regarding the variables/columns I would

Re: [R] expression, strsplit, ...

2008-06-25 Thread Gabor Grothendieck
Try this: plot(1, xlab = ~ alpha / V * m^-3 * kg ^-2 * l^4) On Wed, Jun 25, 2008 at 1:06 PM, baptiste Auguié [EMAIL PROTECTED] wrote: DeaR list, I'm a bit lost in the behavior of substitute and co. I often use fairly long axis labels in my graphs (long to write, that is). Typically, they

Re: [R] Hessian in box-constraint problem - concern OPTIM function

2008-06-25 Thread Spencer Graves
The description of your problem is too complex for me to analyze in the time I have available for this. Could you develop a very brief, simple example that illustrates your question? A very brief Monte Carlo, estimating 2 parameters in a very simple formula with one of the parameters at

[R] R/S-Plus Fundamentals and Programming Techniques course in *** New YorkCity *** July 28-29 by XLSolutions Corp

2008-06-25 Thread [EMAIL PROTECTED]
Our July *** New York City *** R/S-Plus Fundamentals and Programming Techniques course is scheduled for: New York City / July 28-29, 2008 *** Please direct enquiries to Sue Turner: [EMAIL PROTECTED] Payment due AFTER the class Ask for Group Discount --- Looking for R

[R] dgamma in WinBUGS and JAGS (rjags)

2008-06-25 Thread Seyed Reza Jafarzadeh
Hello, In WinBUGS 1.4 manual (http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/manual14.pdf), the gamma density is presented as dgamma(r,mu) where r and mu are the shape and rate parameters, respectively. In JAGS (rjags) manual version 1.0.2, May 9, 2008

[R] pvclust:a general and a specific question

2008-06-25 Thread asl
I realize questions about packages should go to the package maintainer, but perhaps I have an old email address ([EMAIL PROTECTED]) Also I have both a general, and a specific, question. 1) General question: i've used pvclust before to assess significance of clusters and got reasonable results.

[R] Is this sapply behaviour normal?

2008-06-25 Thread Victor Homar
Hi, I'm trying to use sapply to compute the min of several variables, each of them stored in data.frames, grouped as a list: Is it normal that mean() and min() produce different objects dimensions? str(dats) List of 5 $ log20:'data.frame': 83 obs. of 5 variables: ..$

Re: [R] logistic regression

2008-06-25 Thread Mikhail Spivakov
Sorry for flooding this forum, but I think I've realised that I need to do multinomial logistic regression for my problem... Would be interested in your opinion as to whether this is actually any better than running three binomial logistic regressions separately.. Thanks M On Wed, Jun 25, 2008

[R] Goodness-of-fit for zero-truncated poisson distribution

2008-06-25 Thread Roger Prins
Hi there, I am trying to write a function to perform GOF test of data to a zero-truncated Poisson distribution. I am facing 2 problems. 1) How can I obtain a frequency table for all values within the range of observed values? For instance if the observations are obs - c(A, A, A, A, B, C, C, D,

[R] Equivalence test...

2008-06-25 Thread Andrea Cosacov
Dear helpeRs: I am writting you because I have some doubts in relation to the equivalence test. I am interested in compare seed set of treated plants and control plants. I used the tost command in R, and the value of epsilon that I put was the standard deviation of the control sample. In all

[R] R alternative to SAS PROC REPORT

2008-06-25 Thread Philip Twumasi-Ankrah
R has wonderful graphics but I am wondering whether there is anything in R to provide customization of tables like PROC Report does in SAS. A Smile costs Nothing  But Rewards Everything Happiness is not perfected until it is shared   

Re: [R] running R-code outside of R

2008-06-25 Thread Daniel Folkinshteyn
If I analyze a client's data using an R script I created then I can charge the client a $20,000 consulting fee, but, if I let the client push the button to execute the R script and charge him 10 cents for the privilege then I can be sued for violating the GPL? Or are my I think you cannot be

[R] strange imaging issues

2008-06-25 Thread Patrick Jackson
It seems that just recently my plot outputs are getting messed up. Currently I am only getting the plotted points and the bottom axis. I am getting no text and no side axis. As far as I know nothing got changed on the server. I have tested this with simple plots and with plots that have heading

Re: [R] R alternative to SAS PROC REPORT

2008-06-25 Thread stephen sefick
Example- I don't know SAS well, or at all at this point. But, if I knew what you wanted maybe I could help you. thanks Stephen On Wed, Jun 25, 2008 at 3:32 PM, Philip Twumasi-Ankrah [EMAIL PROTECTED] wrote: R has wonderful graphics but I am wondering whether there is anything in R to

Re: [R] running R-code outside of R

2008-06-25 Thread Roger Leenders
Thanks to all of the responders. It looks like dreams may come true after all :-) The application is as follows. Respondents fill out a questionnaire that has been posted online. Output is in excel or text format. My client (typically working for a government agency that provides subsidies

Re: [R] Using metric units in plots

2008-06-25 Thread Patrick Connolly
On Fri, 20-Jun-2008 at 01:08PM +0100, Gavin Simpson wrote: | But it is not too difficult to do this yourself: | | in2cm - function(x) return(x * 2.54) | | cm2in - function(x) return(x * 0.3937008) | | then use in2cm() or cm2in() depending on what you want to achieve. If | you want a margin of

Re: [R] Is this sapply behaviour normal?

2008-06-25 Thread Kenn Konstabel
On Wed, Jun 25, 2008 at 6:00 PM, Victor Homar [EMAIL PROTECTED] wrote: Hi, I'm trying to use sapply to compute the min of several variables, each of them stored in data.frames, grouped as a list: Is it normal that mean() and min() produce different objects dimensions? it is exactly

Re: [R] Is this sapply behaviour normal?

2008-06-25 Thread Rolf Turner
The answer to your question is ``yeah, sort of''. The reason for the difference is that mean() is generic and has a method for data frames, according to which the mean of each column of the data frame is found in some ``appropriate'' manner. (Essentially the columns of the data frame must be

Re: [R] xyplot questions - axis and plotting two things in same panel

2008-06-25 Thread Franz Mueter
As for your first problem, try: xyplot(numbers~breaks|moltype, groups = type, data = alldata, type = l) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karin Lagesen Sent: Wednesday, June 25, 2008 2:13 AM To: r-help@r-project.org Subject: [R] xyplot

[R] R help

2008-06-25 Thread ramya . victory
hi, I have a question could please help me. Geneset.ls - list() for(i in 1: 5452) { Geneset.ls[[i]] - read.delim(c.all.v2.5.symbols.gmt, header=T, skip=1, sep=\t) } I have a file named c.all.v2.5.symbols.gmt.it is a huge file with about 30 columns and 5452 rows. I want to write single rows

Re: [R] Find max of a row in data frame (like Excel)

2008-06-25 Thread Kenn Konstabel
apply max to columns f1...f4 and assign it to rs$f: rs$f - apply(rs[,paste(f,1:4,sep=)],1,max) or rs$f - apply(rs[,2:5],1,max) On Wed, Jun 25, 2008 at 1:41 AM, Anh Tran [EMAIL PROTECTED] wrote: Hi, Here's the data we have: rs[1:5,] probe_id f1 f2 f3 f4 MA f

Re: [R] Is this sapply behaviour normal?

2008-06-25 Thread Wacek Kusnierczyk
Rolf Turner wrote: The answer to your question is ``yeah, sort of''. The reason for the difference is that mean() is generic and has a method for data frames, according to which the mean of each column of the data frame is found in some ``appropriate'' manner. (Essentially the columns of

Re: [R] help with cube3d cube size

2008-06-25 Thread Duncan Murdoch
Mark Kimpel wrote: Ben and Duncan, Thanks for your helpful suggestions. Im having some difficulty navigating this really good package using my normal learning techniques. When I do 'help(package = rgl) it seems only a very small subset of functions available show up. I think the full list

Re: [R] R help

2008-06-25 Thread Philipp Pagel
On Wed, Jun 25, 2008 at 01:06:48PM -0700, [EMAIL PROTECTED] wrote: Geneset.ls - list() for(i in 1: 5452) { Geneset.ls[[i]] - read.delim(c.all.v2.5.symbols.gmt, header=T, skip=1, sep=\t) } I have a file named c.all.v2.5.symbols.gmt.it is a huge file with about 30 columns and 5452 rows.

[R] Reminder about R 'chat room'...

2008-06-25 Thread Dan Bolser
If you like using IRC, then you might like to try the channel devoted to R: irc://irc.freenode.net/#R You can go there to ask all your R related questions! -- MetaBase - http://BioDatabase.Org [[alternative HTML version deleted]] __

[R] Use plotmath expressions read from a text file in mtext/bquote

2008-06-25 Thread Paul.Rustomji
Hello R-help List I am writing some R scripts to create graphs of water quality trends that will be called by a web service running R. The axis titles will need to change as the input data (ie. water quality variable) changes according to a user's choice made via a web page. The way I am

Re: [R] help with cube3d cube size

2008-06-25 Thread Mark Kimpel
Thanks for the pointers. I think the package is great, just want to use it to its full potential without driving the list crazy with questions. Below is my output to help and sessionInfo(). I don't see the scaling functions, although I now see that they can be retrieved with ?matrices. You guys

Re: [R] Find max of a row in data frame (like Excel)

2008-06-25 Thread Anh Tran
Thanks all. I got the result I wanted. I appreciate all the pointer. I never fully understand the apply function, as well as the lapply. And this occasion is one of those where these functions comes in to play. On Wed, Jun 25, 2008 at 2:10 PM, Kenn Konstabel [EMAIL PROTECTED] wrote: apply max

Re: [R] R alternative to SAS PROC REPORT

2008-06-25 Thread Frank E Harrell Jr
Philip Twumasi-Ankrah wrote: R has wonderful graphics but I am wondering whether there is anything in R to provide customization of tables like PROC Report does in SAS. You can do far better than PROC REPORT. See for example

  1   2   >