[R] Michaelson-Morley Speed of Light Data

2012-04-11 Thread Křištof Želechovski
URL: http://finzi.psych.upenn.edu/R/library/datasets/html/morley.html The classical data of Michaelson and Morley on the speed of light Can you provide more information about the data? How were they obtained, etc.? I do not have the book Genstat Primer and the nearest location where it is

Re: [R] taylor.diagram from plotrix package

2012-04-11 Thread Jim Lemon
On 04/10/2012 11:50 PM, anaraster wrote: Is there a way to access the numeric results (standard deviation and correlation) obtained with the taylor.diagram ? Hi anaraster, That wouldn't be too difficult, just alter the code to return a list like this: return(list(oldpar,R,sd.r,sd.f))

Re: [R] clock24.plot

2012-04-11 Thread Jim Lemon
On 04/11/2012 12:59 AM, Nick Fankhauser wrote: I've got the strange problem with clock24.plot that only the first data point (phase = 23.38, size = 0.44) from the phases/sizes numeric vectors is plotted. Does anyone have an idea why this could be? library(plotrix) phases- c(23.38, 22.29, 22.71)

Re: [R] What is a better way to deal with lag/difference and loops in time series using R?

2012-04-11 Thread jpm miao
Hello, Thank you very much. How can I create an empty time series with the same dates as existing time series? If x is a ts object, then it would be easy: y-ts(NA, start=start(x), end=end(x),frequency=frequency(x)) What can I do if x is a zoo or xts object? I come up with a

Re: [R] how to save multiple work space

2012-04-11 Thread ya
Hi Petr and Michael, Thank you very much for the response. It worked! Now I can use multiple R sessions simultaneously, I just need to save their workspace separately. And If I want those objects in the single session, I just load them all in this session, and save the workspace again

Re: [R] how to save multiple work space

2012-04-11 Thread ya
Hi Petr and Michael, Thank you very much for the response. It worked! Now I can use multiple R sessions simultaneously, I just need to save their workspace separately. And If I want those objects in the single session, I just load them all in this session, and save the workspace again

[R] Read .idat Illumina files in R

2012-04-11 Thread Ekta Jain
Dear Bioc and R List Users, I am having trouble analysing illumine data generated from BeadScan. I have .idat files and JPEG images. I realise that i need bead-level summary data to be able to begin quality control followed by normalization. Is there a way i can read .idat files for expression

[R] Markov-switching VAR estimation and simulation

2012-04-11 Thread mamush bukana
Dear R users, I need to fit and then simulate the fitted 2 state Markov-switching VAR model. My google search shows that there is a package called MSVAR for problems of this kind. But it seems the package is removed from the CRAN repository. May I get a help from someone here please? Thanks

[R] Problem with effects package

2012-04-11 Thread Michael Kubovy
sessionInfo() R version 2.15.0 (2012-03-30) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] grid datasets splines utils stats [6] graphics grDevices methods base

Re: [R] What is a better way to deal with lag/difference and loops in time series using R?

2012-04-11 Thread Gabor Grothendieck
On Tue, Apr 10, 2012 at 11:21 PM, jpm miao miao...@gmail.com wrote: Hello,   I am writing codes for time series computation but encountering some problems   Given the quarterly data from 1983Q1 to 1984Q2 PI1-ts(c(2.747365190,2.791594762, -0.009953715, -0.015059485, -1.190061246,

Re: [R] Problem with effects package

2012-04-11 Thread John Fox
Dear Michael, From ?effect (under Warnings and Limitations): Binomial generalized linear models cannot have a matrix of successes and failures on the left-hand side of the model formula; instead specify the proportion of successes (i.e., successes/(successes + failures)) as the response, and

Re: [R] Michaelson-Morley Speed of Light Data

2012-04-11 Thread Duncan Murdoch
On 12-04-11 12:43 AM, Křištof Želechovski wrote: URL: http://finzi.psych.upenn.edu/R/library/datasets/html/morley.html The classical data of Michaelson and Morley on the speed of light Can you provide more information about the data? How were they obtained, etc.? I do not have the book

Re: [R] Michaelson-Morley Speed of Light Data

2012-04-11 Thread Prof Brian Ripley
On 11/04/2012 12:42, Duncan Murdoch wrote: On 12-04-11 12:43 AM, Křištof Želechovski wrote: URL: http://finzi.psych.upenn.edu/R/library/datasets/html/morley.html The classical data of Michaelson and Morley on the speed of light Can you provide more information about the data? How were they

Re: [R] how to increase the limit for max.print in R

2012-04-11 Thread Gav
Hi Pooja, You must use options command, something like this options(max.print=5.5E5) For more information type? ?options -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil Thanks Bernardo; cut and paste above line done.. -- View this message in context:

[R] how to compare C-index in Cox model

2012-04-11 Thread frank.chiang
Dear List, If I calculate the C-index after 10-fold cross-validation based on Cox model, which statistic test should I used to compare two C-statistc values.I means I use cross-validation to obtain a predictive probability for each individual, then combine all the probabilities to calculate

[R] 7 arguments passed to .Internal(identical) which requires 6

2012-04-11 Thread krtek
Hello, I've just installed R-2.15.0 (I've had R 2.13.2 before it and I've deleted everything before I started to install new version). When I've tried to run my script by command source() I received this message: Error in source(script.R) : 7 arguments passed to .Internal(identical) which

Re: [R] xyplot lattice fine control of axes limits and thick marks (with log scale)

2012-04-11 Thread maxbre
hi, I just realised I want to go a little further in the control of the chart appearance and I would like to have the same number of ticks displayed in both axes of all panels given this code xyplot(tv ~ ms | sub_family, data=tm, #as.table=TRUE, aspect=xy, xlab =

Re: [R] xyplot lattice fine control of axes limits and thick marks (with log scale)

2012-04-11 Thread David Winsemius
On Apr 11, 2012, at 6:28 AM, maxbre wrote: hi, I just realised I want to go a little further in the control of the chart appearance and I would like to have the same number of ticks displayed in both axes of all panels given this code xyplot(tv ~ ms | sub_family, data=tm,

Re: [R] What is a better way to deal with lag/difference and loops in time series using R?

2012-04-11 Thread R. Michael Weylandt
Here's one: x - xts(1:5, Sys.Date() + 1:5) y - xts(rep(NA, length(x)), time(x)) or another, less direct but shorter: y - cbind(x, NA)[,2] Michael On Wed, Apr 11, 2012 at 4:16 AM, jpm miao miao...@gmail.com wrote: Hello,    Thank you very much.    How can I create an empty time series

[R] convex nonnegative basis vectors in nullspace of matrix

2012-04-11 Thread capy_bara
Dear all, I want to explore the nullspace of a matrix S: I currently use the function Null from the MASS package to get a basis for the null space: S = matrix(nrow=3, ncol=5, c(1,0,0,-1,1,1,1,-1,-1,0,-1,0,0,0,-1)); S MASS::Null(t(S)) My problem is that I actually need a nonnegative basis for

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-04-11 Thread R. Michael Weylandt
Well, obviously the interface to .Internal(identical) changed between 2.13.x and 2.15 -- as, ?.Internal says: Only true R wizards should even consider using this function... Anyways, find where you use it in your script and then we can help -- there's not much we can do without seeing the

Re: [R] Merging multiple .csv files

2012-04-11 Thread R. Michael Weylandt
Simply pass all = FALSE to merge_all merge_all(list_of_files, by = Name, all = FALSE) Michael On Wed, Apr 11, 2012 at 1:09 AM, Chintanu chint...@gmail.com wrote: Thanks to David and Michael Michael: That works, however with a glitch. Each of my 24 files has got two columns: Name, and

Re: [R] xyplot lattice fine control of axes limits and thick marks (with log scale)

2012-04-11 Thread David Winsemius
On Apr 11, 2012, at 9:03 AM, David Winsemius wrote: On Apr 11, 2012, at 6:28 AM, maxbre wrote: hi, I just realised I want to go a little further in the control of the chart appearance and I would like to have the same number of ticks displayed in both axes of all panels given this

[R] Question on Counting Factors

2012-04-11 Thread Daniel Gabrieli
Hi, I hope this is not too trivial, but I've had this recurring problem and I think there is super easy solution, just not sure what it is. Please see short example below.  I would like to get the frequency (counts) of all the variables in a single column (that is easy), but I would also like to

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-04-11 Thread Prof Brian Ripley
On 11/04/2012 14:08, R. Michael Weylandt wrote: Well, obviously the interface to .Internal(identical) changed between 2.13.x and 2.15 -- as, ?.Internal says: Only true R wizards should even consider using this function... Anyways, find where you use it in your script and then we can help --

Re: [R] Question on Counting Factors

2012-04-11 Thread David Winsemius
On Apr 11, 2012, at 9:21 AM, Daniel Gabrieli wrote: Hi, I hope this is not too trivial, but I've had this recurring problem and I think there is super easy solution, just not sure what it is. Please see short example below. I would like to get the frequency (counts) of all the variables in a

Re: [R] Question on Counting Factors

2012-04-11 Thread David Barron
This would do it in your example: levels(animals$V1) - c(cat,tiger,dog,fish) table(animals) cattigerdog fish 2 200 HTH David cat tiger dog fish 2 2 0 0 On 11 April 2012 14:21, Daniel Gabrieli daniel.gabri...@gmail.com wrote:

Re: [R] Question on Counting Factors

2012-04-11 Thread S Ellison
I would like to get the frequency (counts) of all the variables in a single column (that is easy), but I would also like to return the value 0 for the absence of variables defined in another column. If you use factor() on your columns and include all the animals in the factor levels, you

Re: [R] Question on Counting Factors - PS

2012-04-11 Thread S Ellison
-Original Message- This would do it in your example: levels(animals$V1) - c(cat,tiger,dog,fish) table(animals) cattigerdog fish 2 200 But be very wary of levels(animals$V2)- c(cat,tiger,dog,fish) table(animals$V2) cat tiger dog

[R] inference for customized regression in R?

2012-04-11 Thread Michael
Hi all, Are there functions in R that could help me do the following? We have a special type of regression which is called Geometric Mean Regression. We have done some search and found the following: https://stat.ethz.ch/pipermail/r-help/2011-July/285022.html The question is: how to do the

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-04-11 Thread Uwe Ligges
On 11.04.2012 15:27, Prof Brian Ripley wrote: On 11/04/2012 14:08, R. Michael Weylandt wrote: Well, obviously the interface to .Internal(identical) changed between 2.13.x and 2.15 -- as, ?.Internal says: Only true R wizards should even consider using this function... Anyways, find where you

Re: [R] X11 display problem

2012-04-11 Thread MacQueen, Don
I use ssh -Y in this situation. You can test with other X client applications, such as xclock. Try running xclock after your login. If you get the same unable to open message then it's not an R problem. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627

Re: [R] inference for customized regression in R?

2012-04-11 Thread R. Michael Weylandt
Given the caveats Ted describes here: http://tolstoy.newcastle.edu.au/R/help/05/06/5992.html it seems that bootstrapping might be the only way to get (somewhat) credible prediction intervals: the boot package on CRAN can help to facilitate getting these. Here's some documentation for CI:

Re: [R] For loops

2012-04-11 Thread MacQueen, Don
In addition to what Jeff and David have said... If you really want to create a separate data frame for each subgroup then you need use the assign function, and also data.split[[i]] instead of data.split[1]. for (i in 1:3) { assign( paste('sub',i,sep='') , data.split[[i]] } Jeff showed you

[R] Need help with scraping Google Insight

2012-04-11 Thread Reza Salimi-Khorshidi
Hi all, I appreciate that if someone please help me with an R solution/code/library for scraping Google Insight data. It seems difficult to get hold of the URL corresponding to the resulting CSV file that is appropriate for *read.csv*or another similar function. Best, R [[alternative HTML

[R] [R-pkgs] mosaic 0.4 on CRAN

2012-04-11 Thread Randall Pruim
One of the products of Project MOSAIC (funded by an NSF CCLI grant) has been the development of an R package with the goal of making it easier to use R, especially in teaching situations. We're not quite ready to declare that we've reached version 1.0, but version 0.4 does represent a fairly

Re: [R] inference for customized regression in R?

2012-04-11 Thread Michael
Hi Michael, Thank you for your help! I did some googling and researching... Reading the following article, http://www.ecd.bnl.gov/pubs/BNL-79819-2008-JA.pdf It seems that once we estimate the parameters of the bivariate normal distribution, then we can plug into the formula of conditional

Re: [R] multicore/mcparallel error

2012-04-11 Thread Wyatt McMahon
Michael, Thanks for your help! I may not be understanding you. I've upgraded to 2.15. From your text below, I thought the parallel package was included with R 2.15, but I cannot find an mclapply function there. One exists through the multicore package, which I've now installed. I also went

Re: [R] For loops

2012-04-11 Thread Clemontina Alexander
This has nothing to do with your question, but instead of using class=c(rep(1,3),rep(2,3),rep(3,3)) It's probably easier to use class = rep(1:3, each =3) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Survreg output - interpretation

2012-04-11 Thread mariaeugeniau
Hello R users, I am analizing survival data (mostly uncensored) and want to extract the most out of it. Since I have more than one factor, I´ve read that the survival regression can help to test the interactions between factors, and then decide how to do the comparisons using the Log-rank test

Re: [R] nls function

2012-04-11 Thread John C Nash
nls() often gives this message, which is misleading in that it is the Jacobian that is not of full rank in the solution of J * delta ~ - residuals or in more conventional Gauss-Newton J' * J delta = -g = - J' * residuals. My view is that the gradient itself cannot be singular. It's just

[R] strsplit help

2012-04-11 Thread alison waller
Dear all, I want to use string split to parse column names, however, I am having some errors that I don't understand. I see a problem when I try to rbind the output from strsplit. please let me know if I'm missing something obvious, thanks, alison here are my commands:

Re: [R] Date formate “ %y-%d-%m “ or “ %m-%d-%y “ ?

2012-04-11 Thread Rui Barradas
Hello, I would like to know for each variable what is date format? Is it “ %y-%d-%m “ or “ %m-%d-%y “ It's 4 digits, with uppercase 'Y' Try Data - data.frame(var1=c(12-15-2011, 12-15-2011, 12-17-2001), var2=c(2001-15-12, 2001-15-01, 2001-15-01),

Re: [R] [R-SIG-Mac] plot 2 graphs on the same x-y plane

2012-04-11 Thread Susan Gruber
Hi, A line can be added to an existing plot using the abline function. For example, if a is the intercept and b is the slope, the command would be abline(a=a, b=b) To overlay a new plot on an existing one, use the command: par(new=TRUE). For example: plot(1:10, 1:10) par(new=TRUE)

[R] R-help; generating censored data

2012-04-11 Thread Christopher Kelvin
Hello,  can i implement this as 10% censored data where t gives me failure and x censored. Thank you p=2;b=120 n=50 set.seed(132); r-sample(1:50,45) t-rweibull(r,shape=p,scale=b) t set.seed(123);  cens - sample(1:50, 5)  x-runif(cens,shape=p,scale=b)  x Chris Guure Researcher, Institute for

Re: [R] [BioC] Read .idat Illumina files in R

2012-04-11 Thread Moiz Bootwalla
Hi Ekta, You can use the bioconductor package methylumi to read in .idat files. The function methylumIDAT() will read in .idat files and provide you with beta values along with the M and U values as a MethyLumiSet object. You can then use the functions methylumi.bgcorr() and

Re: [R] [BioC] Read .idat Illumina files in R

2012-04-11 Thread Tim Triche, Jr.
Unfortunately, this won't help for expression arrays. Last time I checked, those IDATs appeared to be encrypted. crlmm, methylumi, and minfi can all read IDAT files... *if* they are version 3 or later (e.g. genotyping, methylation, etc). Otherwise you are probably stuck with GenomeStudio if it

Re: [R] xyplot lattice fine control of axes limits and thick marks (with log scale)

2012-04-11 Thread maxbre
Oh yes, I see now the problem... thank you max -- View this message in context: http://r.789695.n4.nabble.com/xyplot-lattice-fine-control-of-axes-limits-and-thick-marks-with-log-scale-tp4511897p4549180.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-04-11 Thread krtek
Thank you! Updating to R-patched really helped me. My problem were not been into my code. I've tried to run source() and the error had occurred again. I didn't use a mixture of different versions of R, version 2.13.2 has been deleted. -- View this message in context:

[R] bayesian gene network construction

2012-04-11 Thread email mail
Hello: I have looked at the bnlearn and deal packages for infering bayesian network. Can anyone suggest any other suitable package for constructing bayesian gene regulatory network using gene expression data? Thanks! John [[alternative HTML version deleted]]

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-04-11 Thread R. Michael Weylandt
Can you give the line of code that gives the error? That'd make it much easier to see what's there that should/shouldn't be. Michael On Wed, Apr 11, 2012 at 11:28 AM, krtek marshal...@mail.ru wrote: Thank you!  Updating to R-patched really helped me. My problem were not been into my code.

[R] row.names in dunes and dunes.env?

2012-04-11 Thread Chris Butler
Hello, I've got a small dataset on box turtle shell measurements that I would like to perform a detrended correspondence analysis on. I thought that it would be interesting to examine the morphometrics for each species in the area of overlap and in areas where neither species occurs.  I've

Re: [R] multicore/mcparallel error

2012-04-11 Thread R. Michael Weylandt
Parallel is one of those packages (like tools or grid) that is not loaded by default, but comes with the standard installation. Running library(parallel) will make mclapply() available. Then (at least for me) it's easy to parallelize some code: system.time(lapply(1:5, function(x)

Re: [R] multicore/mcparallel error

2012-04-11 Thread Wyatt McMahon
Thanks a ton, Michael! Everything is running much faster now!! Wyatt -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: Wednesday, April 11, 2012 1:41 PM To: Wyatt McMahon Cc: R-help@r-project.org Subject: Re: [R] multicore/mcparallel error Parallel

Re: [R] strsplit help

2012-04-11 Thread Jean V Adams
Alison, Your code works fine on the first six lines of the data that you provided. Rumino_Reps_agreeWalign - data.frame( geneid = c(657313.locus_tag:RTO_08940, 457412.251848018, 657314.locus_tag:CK5_20630, 657323.locus_tag:CK1_33060,

[R] Lattice densityplot with semitransparent filled regions

2012-04-11 Thread Walmes Zeviani
Hello, I'm doing some graphics for a paper and a need customize such with filled region above the density curve. My attempts I get something very near what I need, but I don't solve the problem of use semitransparent filled. Below a minimal reproducible code. Someone has any idea?

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-04-11 Thread Henrik Bengtsson
FYI, whenever getting an error, run traceback() *immediately after* (i.e. before any other commands) and include that in your error report. Also include the output of sessionInfo(). It helps tremendously and spares lots of second guessing. /Henrik On Wed, Apr 11, 2012 at 8:28 AM, krtek

Re: [R] strsplit help

2012-04-11 Thread David Winsemius
On Apr 11, 2012, at 2:01 PM, Jean V Adams wrote: Alison, Your code works fine on the first six lines of the data that you provided. Rumino_Reps_agreeWalign - data.frame( geneid = c(657313.locus_tag:RTO_08940, 457412.251848018,

Re: [R] strsplit help

2012-04-11 Thread Jean V Adams
David, Right you are! Thanks for pointing that out. strsplit - 1:10 strsplit(With spaces, NULL) strsplit Jean David Winsemius dwinsem...@comcast.net wrote on 04/11/2012 01:17:07 PM: [image removed] Re: [R] strsplit help David Winsemius to: Jean V Adams 04/11/2012 01:19 PM

Re: [R] nls function

2012-04-11 Thread peter dalgaard
On Apr 11, 2012, at 16:51 , John C Nash wrote: nls() often gives this message, which is misleading in that it is the Jacobian that is not of full rank in the solution of J * delta ~ - residuals or in more conventional Gauss-Newton J' * J delta = -g = - J' * residuals. My view is

Re: [R] Lattice densityplot with semitransparent filled regions

2012-04-11 Thread ilai
densityplot(~y|B, groups=A, data=dt, plot.points=rug, col=trellis.par.get(superpose.polygon)$col, alpha=.5, panel=panel.superpose, panel.groups=my.panel.densityplot) Worked for me (i.e. semi-transparent superpose.polygon colors). Is that not what

[R] Partial Dependence and RandomForest

2012-04-11 Thread jmc
Hello all~ I am interested in clarifying something more conceptual, so I won't be providing any data or code here. From what I understand, partial dependence plots can help you understand the relative dependence on a variable, and the subsequent values of that variable, after averaging out the

Re: [R] Michaelson-Morley Speed of Light Data

2012-04-11 Thread Křištof Želechovski
Dnia środa, 11 kwietnia 2012 13:26:43 Prof Brian Ripley pisze: On 11/04/2012 12:42, Duncan Murdoch wrote: On 12-04-11 12:43 AM, Křištof Želechovski wrote: URL: http://finzi.psych.upenn.edu/R/library/datasets/html/morley.html The classical data of Michaelson and Morley on the speed of

Re: [R] Lattice densityplot with semitransparent filled regions

2012-04-11 Thread Walmes Zeviani
Thank you Ilai. Problem solved. There is a small detail, alpha affects the rug and the curve line opacity too. Is possible to specify it just to polygon? Bests. == Walmes Marques Zeviani LEG (Laboratório de Estatística e

Re: [R] Faceted bar plot shows wrong counts (ggplot2)

2012-04-11 Thread Hadley Wickham
And it's now fixed in the dev version. Hadley On Tue, Mar 13, 2012 at 11:37 AM, Helios de Rosario helios.derosa...@ibv.upv.es wrote: Michael, Thanks for the pointer to the discussion in the ggplot list. It seems that the reason of this behaviour of facet_grid() is already known and being

Re: [R] xyplot lattice fine control of axes limits and thick marks (with log scale)

2012-04-11 Thread ilai
On Wed, Apr 11, 2012 at 7:16 AM, David Winsemius dwinsem...@comcast.net wrote: On Apr 11, 2012, at 9:03 AM, David Winsemius wrote: On Apr 11, 2012, at 6:28 AM, maxbre wrote: hi, I just realised I want to go a little further in the control of the chart appearance and I would like to have

Re: [R] geom_plot creates Area Instead Of Lines

2012-04-11 Thread Hadley Wickham
What I would have liked is something like a cloud of lines, similar to what I get when I convert the data into a matrix (why do I not just use a matrix? I come from MATLAB and this seems natural, however, my data is large and a data frame seems to be an advantageous way to handle that). It's

Re: [R] Michaelson-Morley Speed of Light Data

2012-04-11 Thread Prof Brian Ripley
On 11/04/2012 19:33, Křištof Želechovski wrote: Dnia środa, 11 kwietnia 2012 13:26:43 Prof Brian Ripley pisze: On 11/04/2012 12:42, Duncan Murdoch wrote: On 12-04-11 12:43 AM, Křištof Želechovski wrote: URL: http://finzi.psych.upenn.edu/R/library/datasets/html/morley.html The classical data

Re: [R] extend data frame for plotting heat map in ggplot2

2012-04-11 Thread Hadley Wickham
On Sun, Apr 1, 2012 at 9:16 AM, Till Bayer till.ba...@kaust.edu.sa wrote: Hi all! I want to generate a heat map from an all-vs-all comparison. I have the data, already scaled to 0-1. However, I have the values only for the comparisons in one way, and not for the comparisons between the same

[R] r graphing

2012-04-11 Thread John Kim
can anybody tell me how i can draw x- y- axis and draw x^3 graph using R graph?? i need nice coordinate system with legends and coordinate numberings.. and nice graph of x^3 on it.. it will be nice if you tell me how i can center the graph.. i want the origin (0,0) to be right in the middle of

Re: [R] r graphing

2012-04-11 Thread R. Michael Weylandt
The easiest way is to just use ?curve (type ?curve at the prompt to get documentation for curve): e.g., curve(x^3, from = -5, to = 5) You could also build the plot yourself like: x - seq(-5, 5, length.out = 200) y - x^3 plot(x,y) Michael On Wed, Apr 11, 2012 at 4:41 PM, John Kim

Re: [R] r graphing

2012-04-11 Thread David Winsemius
On Apr 11, 2012, at 4:41 PM, John Kim wrote: can anybody tell me how i can draw x- y- axis and draw x^3 graph using R graph?? i need nice coordinate system with legends and coordinate numberings.. Look at: ?curve and nice graph of x^3 on it.. it will be nice if you tell me how i can

Re: [R] convex nonnegative basis vectors in nullspace of matrix

2012-04-11 Thread Petr Savicky
On Wed, Apr 11, 2012 at 06:04:28AM -0700, capy_bara wrote: Dear all, I want to explore the nullspace of a matrix S: I currently use the function Null from the MASS package to get a basis for the null space: S = matrix(nrow=3, ncol=5, c(1,0,0,-1,1,1,1,-1,-1,0,-1,0,0,0,-1)); S

Re: [R] R-help; generating censored data

2012-04-11 Thread Ted Harding
On 11-Apr-2012 16:28:31 Christopher Kelvin wrote: Hello, can i implement this as 10% censored data where t gives me failure and x censored. Thank you p=2;b=120 n=50 set.seed(132); r-sample(1:50,45) t-rweibull(r,shape=p,scale=b) t set.seed(123);_ cens - sample(1:50, 5)_

Re: [R] convex nonnegative basis vectors in nullspace of matrix

2012-04-11 Thread Petr Savicky
On Wed, Apr 11, 2012 at 06:04:28AM -0700, capy_bara wrote: Dear all, I want to explore the nullspace of a matrix S: I currently use the function Null from the MASS package to get a basis for the null space: S = matrix(nrow=3, ncol=5, c(1,0,0,-1,1,1,1,-1,-1,0,-1,0,0,0,-1)); S

Re: [R] r graphing

2012-04-11 Thread R. Michael Weylandt
Please reply all to the list and don't send HTML. curve(x^3, from = -5, to = 5); grid() If you only want dotted lines at x = 0 y = 0 use grid(2,2) instead. Michael On Wed, Apr 11, 2012 at 6:49 PM, John Kim provicon2...@yahoo.com wrote: thanks for the reply.. i tried the code below.. it

Re: [R] r graphing

2012-04-11 Thread R. Michael Weylandt
Alternatively, you can use curve(x^3, from = -5, to = 5); abline(h = 0, v = 0, lty = 2) which will work even if the axes aren't in the middle of the image. Michael On Wed, Apr 11, 2012 at 6:54 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: Please reply all to the list and don't

Re: [R] r graphing

2012-04-11 Thread R. Michael Weylandt
I repeat myself: Please reply all to the list and don't send HTML. I'm not aware of facilities to do that automatically (though others might now them) -- you can draw arrows manually with the arrows() function. Michael On Wed, Apr 11, 2012 at 7:08 PM, John Kim provicon2...@yahoo.com wrote:

Re: [R] Merging multiple .csv files

2012-04-11 Thread Chintanu
Thanks again. By the way, any idea why I get this error: merged3 - merge_all(list_of_files , by = Name) Error in `[.data.frame`(df, , match(names(dfs[[1]]), names(df))) : undefined columns selected sessionInfo() R version 2.14.2 (2012-02-29) Platform: i386-pc-mingw32/i386 (32-bit) locale:

[R] Encoding of Sweave file error message

2012-04-11 Thread Duncan Mackay
Hi I ran the following sweave file in R2.14.1 and upgraded to R2.15 yesterday with the same setup I got the following error message when I rand the following Sweave file setwd(D:/Cic/Sweave/Parasite/Comb/12) Sweave(D:/Cic/Sweave/Parasite/Comb/12/ParasiteComb12.Rnw) Error:

Re: [R] Encoding of Sweave file error message

2012-04-11 Thread Walmes Zeviani
I had the same problem! So, as I'm a linux user, I prefer use linux terminal. On terminal I type this to compile R CMD Sweave --encoding=utf-8 myfile.Rnw and the compilation is successful. Try to set the encoding option in Sweave(). Bests. Walmes.

[R] deferred call

2012-04-11 Thread Whit Armstrong
I must admit I'm a little ashamed to have been using R for so long, and still lack a sound understanding of deferred calls, eval, deparse, substitute, and friends. I'm attempting to make a deferred call to a function which has default arguments in the following way: call.foo - function(f) {

[R] Definition of lag is opposite in ts and xts objects!

2012-04-11 Thread jpm miao
Example: Will ts objects be obsolete or modified? a[,1] 1983 Q1 2.747365190 1983 Q2 2.791594762 1983 Q3 -0.009953715 1983 Q4 -0.015059485 1984 Q1 -1.190061246 1984 Q2 -0.553031799 1984 Q3 0.686874720 1984 Q4 0.953911035 lag(a,4)[,1] 1983 Q1 NA 1983

Re: [R] deferred call

2012-04-11 Thread Gabor Grothendieck
On Wed, Apr 11, 2012 at 10:17 PM, Whit Armstrong armstrong.w...@gmail.com wrote: I must admit I'm a little ashamed to have been using R for so long, and still lack a sound understanding of deferred calls, eval, deparse, substitute, and friends. I'm attempting to make a deferred call to a

Re: [R] Definition of lag is opposite in ts and xts objects!

2012-04-11 Thread jpm miao
BTW, zoo is like ts in the application of lag. In other words, zoo and xts are opposite in this issue. 2012/4/12 jpm miao miao...@gmail.com Example: Will ts objects be obsolete or modified? a[,1] 1983 Q1 2.747365190 1983 Q2 2.791594762 1983 Q3 -0.009953715 1983 Q4

Re: [R] Definition of lag is opposite in ts and xts objects!

2012-04-11 Thread R. Michael Weylandt
Yes, this is as documented. See ? lag.xts under details for the justification and how to change the default if desired. Michael On Wed, Apr 11, 2012 at 11:13 PM, jpm miao miao...@gmail.com wrote: BTW, zoo is like ts in the application of lag. In other words, zoo and xts are opposite in this

Re: [R] Definition of lag is opposite in ts and xts objects!

2012-04-11 Thread Jeff Newmiller
What makes you think those are the only two options? I happen to prefer the xts convention, but there is a lot of code out there that successfully uses ts just as it is, and I can't see breaking all of that to meet an arbitrary preference of sign convention. (It isn't my decision anyway...)

[R] Schedule R script using cron

2012-04-11 Thread winie
I am trying to schedule my R script using cron, but it is not working. It seems R can not find packages in cron. Anyone can help me? Thanks. The following is my bash script # source my porfile . /home/winie/.profile # script.R will load packages R CMD BATCH /home/script.R -- View this message

[R] phangorn and calculation of a rate matrix

2012-04-11 Thread Francisco
Hi, I'm trying to calculate a ratematrix for a RNA aligment (U instead of T) in order to use it as a ratematrix in Profidst (a phylogenetic program which takes into account both the primary sequence and the secondary structure of the RNA, in my case rRNA). The sequence-structure aligment has been

[R] Converting php arrays to data frame

2012-04-11 Thread beltrand
Hi, I am working on an implementation of R within some web application (R is just a part of a larger project, so R has to be incorporated within an existing setup) Here is the scenario, PHP grabs a csv dataset from some server and turns it into a 2 dimensional array (with each row being an

[R] how to compare cross-validated C-index in Cox

2012-04-11 Thread frank.chiang
If I calculate the C-index after 10-fold cross-validation based on Cox model, which statistic test should I used to compare two C-statistc values.I means I use cross-validation to obtain a predictive probability for each individual, then combine all the probabilities to calculate the C-index.If

[R] Could dynlm function work for xts objects?

2012-04-11 Thread jpm miao
It seems to only works for zoo or ts objects? I tried to run it for xts objects, and error message occurs. Once I coerce it to be an zoo object (by as.zoo), it works. Error message: Error in model.frame.default(formula = dynformula(PIh - PI ~ L(X, 0:i) + : variable lengths differ (found for

Re: [R] Encoding of Sweave file error message

2012-04-11 Thread Duncan Mackay
At 12:03 12/04/2012, you wrote: I had the same problem! So, as I'm a linux user, I prefer use linux terminal. On terminal I type this to compile R CMD Sweave --encoding=utf-8 myfile.Rnw and the compilation is successful. Try to set the encoding option in Sweave(). Bests. Walmes.

Re: [R] deferred call

2012-04-11 Thread Bert Gunter
On Wed, Apr 11, 2012 at 8:12 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Wed, Apr 11, 2012 at 10:17 PM, Whit Armstrong armstrong.w...@gmail.com wrote: I must admit I'm a little ashamed to have been using R for so long, and still lack a sound understanding of deferred calls, eval,