Re: [R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
So i think I am doing mistake in converting ASCII values in col V10 in my data frame (dfa.).can you please tell me that, is this the right way to convert ASCII values into decimal- dfa$V10=lapply(dfa[,4], function(c) as.numeric(charToRaw(c))) Thanking you, Warm Regards Vikas Bansal Msc Bioin

Re: [R] lattice: How to vertically adjust an axis label?

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 6:54 PM, Marius Hofert wrote: Dear expeRts, How can I vertically adjust an axis tick label so that it is nicely aligned with the other labels? library(lattice) xyplot(0~0, xlim=c(0,3), scales=list(x=list(at=c(1,1.1), labels=c(expression(hat(theta)[italic(n)]),expressio

Re: [R] manipulating "by" lists and "ave()" functions

2011-07-08 Thread Joshua Wiley
Hi Ivo, See inline. On Fri, Jul 8, 2011 at 3:42 PM, ivo welch wrote: > dear R wizards---more ignorance on my part, exacerbated by too few > examples in the function documentations. > >> d <- data.frame( id=rep(1:3,3), x=rnorm(9), y=rnorm(9)) > > Question 1: how do I work with the output of "by"?

Re: [R] manipulating "by" lists and "ave()" functions

2011-07-08 Thread William Dunlap
Q1. simplify2array(b) gives the transpose of what I think you want. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of ivo welch > Sent: Friday, July 08, 2011 3:43 P

Re: [R] manipulating "by" lists and "ave()" functions

2011-07-08 Thread ivo welch
It does!! why is this function not mentioned in the "See also" docpage for "by" (and friends)??? (Also, "ave" should be mentioned there, too.) do I post this suggestion to add it to r-devel, or is there a way to find out who is in charge of the docpage for "by"? regards, /iaw On Fri, Jul 8,

[R] Excel export date format

2011-07-08 Thread Jim Lemon
Hi folks, I have been tormented for some time by Excel's habit of exporting dates to CSV files as mm/dd/ format even if the dates are formatted dd/mm/ in the display. What's worse, if there are dates that are of ambiguous (6/6/2011) and unambiguous (16/6/2011) format in the same column

[R] ASCII values to Decimal

2011-07-08 Thread Bansal, Vikas
Dear all, I have a data frame which is like- V1 V2 V3 V4 9 2 ., a\ 9 2.$, a` 13 1 , a 13 1 , a 13 1 , a 1

Re: [R] computing functions with Euler's number (e^n)

2011-07-08 Thread Daniel Malter
The problem arises in the computation of U where (-dummy+1) turns negative (the eighth and higher index values of "dummy"). You raise a negative number to a non-integer power, for example, (-pi)^exp(1), which fails because you would not be able to tell, which sign the resulting number should have.

Re: [R] vectors cross-product V1 x V2

2011-07-08 Thread Bai
Thank you all. I do have two huge matrix like M1[x,y,z,3] x M2[x,y,z,3]. I'll try it. Best, Bai On Fri, Jul 8, 2011 at 11:56 PM, Jeff Newmiller wrote: > RSiteSearch("cross product") > library(pracma) > ?cross > > Speed is usually desired in the context of many similar computations, and is > norm

Re: [R] vectors cross-product V1 x V2

2011-07-08 Thread Hans Werner Borchers
> RSiteSearch("cross product") > library(pracma) > ?cross > > Speed is usually desired in the context of many similar computations, and is > normally achieved in R by vectorizing computation, so storing the large > number of 3d vectors together in a structure like a Nx3 matrix so the code > can be

<    1   2