Hello Mike,
I have radio tracking data involving relocations of raccoons over the course
of a night (locations every 20 minutes). I have the date and time of each
location. I am trying to convert the data into an type II ltraj so I can do
a first passage time analysis. My problem is that when
Forwarded to R-Help, because I think it could interest people following
this thread. Clearly, RServe and svSocket have different goals and very
little overlap.
Best,
Philippe
Original Message
Subject: Re: Video demo of using svSocket with data.table
Date: Wed, 26 Aug 2009
On Wed, Aug 26, 2009 at 07:53:57PM +, Oliver Bandel wrote:
>
> is there a way to write the result of a plot
> to stdout? I mean even a binary thingy like
> a png-file, written to stdout?!
> I tried with the file-argument of png() and jpeg(),
> but did not get working results.
I don't think yo
Dear All,
I am considering to buy a workstation. For the CPUs, I wonder whether
anybody have the experience in choosing one for the R.
Intel Xeon W3540 2.93 8MB/1066 QC CPU is much cheaper as compared with the
Intel Xeon E5540 2.53 8MB/1066 QC CPU. However, its Hz 2.93 is bigger than
2.53. I won
> "KRCT" == Kenneth Roy Cabrera Torres
> on Tue, 25 Aug 2009 17:26:04 -0500 writes:
KRCT> Thank you very much for your help.
KRCT> To the R gurus: It will be better at the future to simplify this
KRCT> options.
KRCT> They are too cumbersome!!!
The ones David showed
Dear Huang,
I do not know how either of these run R in particular. However, the price
difference is because the E5540 is a newer line of chip architecture than
the W3540. One of the differences is the speed that data can be transferred
to and from the chip (Intel now calls it the QPI, it used to
Hi All,
> d = data.frame(a=1:10,b=1:10)
> by1 = rep(c("a","b"),5)
> by(d, by1, function(z) z[,,drop=F])
by1: a
a b
1 1 1
3 3 3
5 5 5
7 7 7
9 9 9
by1: b
a b
2 2 2
4 4 4
6 6 6
8 8 8
10 10 10
> by(d, by1, function(z) z[,
Thanks, Joshua. It's quite helpful. Hope someone can give some idea whether
the Hz or the QPI is relatively important in computing.
Huang
On Thu, Aug 27, 2009 at 4:41 PM, Joshua Wiley wrote:
> Dear Huang,
>
> I do not know how either of these run R in particular. However, the price
> difference
Noah Silverman wrote:
Deb,
I generally run my larger R tasks on a server.
Here is my workflow.
1) Write an R script using a text editor. (There are many popular ones.)
2) FTP the R script to your server.
3) SSH into the server
4) Run R
5) Run the script that you uploaded from the R process you
Bernd Bischl wrote:
> Noah Silverman wrote:
>> Deb,
>>
>> I generally run my larger R tasks on a server.
>>
>> Here is my workflow.
>>
>> 1) Write an R script using a text editor. (There are many popular ones.)
>> 2) FTP the R script to your server.
>> 3) SSH into the server
>> 4) Run R
>> 5) Run
If you are working on windows, Thomas Baier's statconnDCOM and rcom
allow you to access R servers via COM. The statconnDCOM package also has
a servermanager which allows to configure servers for exclusive or
nonexclusive (= common workspace) usage for different clients
(possibly living on differen
Dear R helpers
I have two series A and B as given below -
A <- c(2, 2, 1, 3, 7, 3, 3, 1, 14, 7, 31)
B <- c(0.0728,0.9538,4.0140,0.0020,2.5593,0.1620,2.513,0.3798, .0033,0.2282,
0.1614)
I need to calculate the total in dataset B corresponding to the numbers in
dataset A i.e. for no 1 in A,
My guess is that there is not a
simple answer.
My newest machines are extremely
fast at doing:
sum(rnorm(1e6))
relative to my older machines.
But they are not so much faster at
doing the work that I actually
want done.
But if there is a simple answer, I'd
be keen to hear it.
Patrick Burns
Roberto Perdisci wrote:
Hello everybody,
after searching around for quite some time, I haven't been able to
find a package that provides a function to compute the Windorized mean
and variance. Also I haven't found a function that computes the
trimmed variance. Is there any such package around?
Dear Gerrit Eichner
Thanks a million. This only proves how powerful R is. I really appreciate your
kind help.
Sometimes I really wonder from where I can learn such commands.
Thanks again.
With warmest regards
Maithili
--- On Thu, 27/8/09, Gerrit Eichner wrote:
From: Gerrit Eichner
S
Hi,
I am a new to R. I am using C language to write the code and I am
calling R functions from C ( I am including R.h, Rmath.h etc. in C code). I
would like to know which header file contains the general arithmetic
functions(mean etc.) so that I can add that in my C code. I searched in
inter
Also:
rowsum(B, A)
On Thu, Aug 27, 2009 at 7:03 AM, Maithili Shiva wrote:
> Dear Gerrit Eichner
>
> Thanks a million. This only proves how powerful R is. I really appreciate
> your kind help.
>
> Sometimes I really wonder from where I can learn such commands.
>
> Thanks again.
>
> With warmest r
Patrick Burns wrote:
> My newest machines are extremely
> fast at doing:
>sum(rnorm(1e6))
> relative to my older machines.
> But they are not so much faster at
> doing the work that I actually
> want done.
...like finishing your next book and that sort of stuff? ;-)
--
O__ Peter Da
Dear Peter Konings
Thanks a lot for your kind advice. It worked wonderfully.
Thanks again
Regards
Maithili
--- On Thu, 27/8/09, Peter Konings wrote:
From: Peter Konings
Subject: Re: [R] Comparing and adding two data series
To: "Maithili Shiva"
Date: Thursday, 27 August, 2009, 11:12 A
try this:
> x <- as.data.frame(matrix(round(runif(50),0),nrow=5))
> rownames(x) <- letters[1:dim(x)[1]]
> x
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
a 0 0 1 0 0 1 0 0 0 1
b 1 0 0 0 1 1 1 1 0 0
c 0 1 0 1 0 0 0 0 1 0
d 0 1 0 0 0 1 0 0 1 1
e 0 0 1 1 0 1 1 0
Try this also:
lapply(apply(x == 1, 2, which), names)
On Thu, Aug 27, 2009 at 3:13 AM, Steven Kang wrote:
> Dear R users,
>
> I am trying to extract the rownames of a data set for which each columns
> meet a certain criteria. (condition - elements of each column to be equal
> 1)
>
> I have the c
FAQ 7.31 is probably the answer. If you want to try it, convert all
your numerics that you want to merge on to character and round to the
same value so you can "see" what is actually being matched. Comparing
numerics for equality can present some challanges.
On Wed, Aug 26, 2009 at 9:22 PM, Mehd
dear sir,
my data larger than this example but is of the following format:
y x Age
30 0.0323 O
24 0.0389 Y
158 0.058 Y
120 0.0581 O
100 0.0471 Y
102 0.0615 Y
160 0.0546 O
i ma making a scatter plot of y~x and want to specify different coloured an
Hello there,
I work as a researcher on the FATIMAT project, housed in 'Catholic
University College Sint Lieven', 'Technologiecampus Gent' (in Belgium) ,
dealing with fatigue testing machines (check
http://mechanics.kahosl.be/fatimat/ for more info).
I am using R for studying basic statistics and
Dear Sirs,
At the outset I sincerely apologize for reproducing my query to you. I also
thank all of you for the solution you had provided. It has worked on the actual
data I am working with.
However, there is this peculiar problem which I had realized only after I had
obtained my
Dear all,
Question: How to merge two data frames such that new column are added
in a particular way?
I'm not actually sure how to best articulate my question to be honest,
so i hope showing you what I want to achieve will communicate my
question better.
Lets say I have two data frames:
> DF1 <-
Setup a vector with the shapes and the colors you want that are the
same length as the number of levels in Age:
> x <- read.table('clipboard', header=TRUE)
> x
y x Age
1 30 0.0323 O
2 24 0.0389 Y
3 158 0.0580 Y
4 120 0.0581 O
5 100 0.0471 Y
6 102 0.0615 Y
7 160 0.0546 O
>
Try this:
tapply(B, factor(A, levels = seq(max(A))), sum)
On Thu, Aug 27, 2009 at 9:26 AM, Maithili Shiva wrote:
>
>
>
>
>
>
>
> Dear Sirs,
>
> At the outset I sincerely apologize for reproducing my query to you. I also
> thank all of you for the solution you had provided. It has worked on the
>
> "MO" == Moshe Olshansky
> on Wed, 26 Aug 2009 23:36:22 -0700 (PDT) writes:
MO> You can do
MO> for (i in 1:ncol(x)) {names <-
rownames(x)[which(x[,i]==1)];eval(parse(text=paste("V",i,".ind<-names",sep="")));}
you can, but after install.packages("fortunes")
> require("f
Try this:
xtabs(as.numeric(Measure) ~ Show + Datetime, data = DF3)
On Thu, Aug 27, 2009 at 8:04 AM, Tony Breyal wrote:
> Dear all,
>
> Question: How to merge two data frames such that new column are added
> in a particular way?
>
> I'm not actually sure how to best articulate my question to be
Hello again,
Just for your information, I think I found a way to work around the
problem described below. I don’t know if it’s the most elegant way, but
it seems to work.
Am Mittwoch, den 26.08.2009, 11:55 +0200 schrieb Frederik Elwert:
> Hello!
>
> I imported a DJI survey[1] from an SPSS file.
kbs wrote:
>
> This is the link that gave me the indication:
>
> https://stat.ethz.ch/pipermail/r-help/2007-March/127261.html
>
> Are there alternative ways to deal with a high count of zeros for
> count data with lmer?
>
Fair enough. I think the problem is that lme4 has changed quite
If you don't have too many groups then you could get mgcv:gam to fit this
using the Tweedie family from mgcv. It's a bit fiddly, but there's an example
at the end of ?gam.models with exactly your RE structure.
On Wednesday 26 August 2009 17:30, Mohammad AlMarzouq wrote:
> Hello all,
>
> I have
On Aug 27, 2009, at 8:31 AM, Henrique Dallazuanna wrote:
Try this:
tapply(B, factor(A, levels = seq(max(A))), sum)
Nice! It might have a disadvantage in that it produces NA's instead of
the requested 0's, but that would be easily remedied with an:
is.na(obj) <- 0
It was much neater than
You may want to use the reshape package for this task:
> library(reshape)
> recast(DF3,Show ~ Datetime, id.var=names(DF3),value="Measure")
Show 08/26/2009 11:30 AM 08/26/2009 9:30 AM
1 Firefly 3 1
2 Red Dwarf 4 2
If yo
Dear Sirs,
Â
Thanks again for the solution. That was "VERY KIND" of you to readress my query
again and again. Please accept my sincere aplogies for referring the problem
again and thanks again for the solution. You were very patience and I really
appreciate that. Have a great day ahead.
Â
With
Try this:
xtabs(B ~ factor(A, seq(max(A
On Thu, Aug 27, 2009 at 8:26 AM, Maithili Shiva wrote:
>
>
>
>
>
>
>
> Dear Sirs,
>
> At the outset I sincerely apologize for reproducing my query to you. I also
> thank all of you for the solution you had provided. It has worked on the
> actual data
I am creating a strip plot from the lattice library, and would like the
display to also have the linear model line through it. How would I do that?
stripplot(jitter(vs30)~tif.vs30, data=rastermodel, xlim=c(150,600),
ylim=c(0,1000))
yonglm<-lm(vs30~tif.vs30, data=rastermodel)
Thanks!
[[
Hello,
I have the vector (a,b,a,c) and I trying to obtain it's distinct elements in
another vector.
Is there a function that can do this?
Thanks,
Bogdan
--
View this message in context:
http://www.nabble.com/distinct-elements-of-a-vector-tp25168032p25168032.html
Sent from the R help mailing l
This is of great help, thanks!
Roberto
On Thu, Aug 27, 2009 at 7:20 AM, Jim Lemon wrote:
> Roberto Perdisci wrote:
>>
>> Hello everybody,
>> after searching around for quite some time, I haven't been able to
>> find a package that provides a function to compute the Windorized mean
>> and varianc
Have a look at Karim Chine's R/Biocep project:
http://biocep-distrib.r-forge.r-project.org/
/henrik
On Wed, Aug 26, 2009 at 9:12 PM, Moshe Olshansky wrote:
> Hi Deb,
>
> Based on your last note (and after briefly looking at Rserve) I believe that
> you should install R with all the packages y
On Thu, Aug 27, 2009 at 9:55 AM, Stephen Tucker wrote:
> You may want to use the reshape package for this task:
>
>> library(reshape)
>> recast(DF3,Show ~ Datetime, id.var=names(DF3),value="Measure")
> Show 08/26/2009 11:30 AM 08/26/2009 9:30 AM
> 1 Firefly 3
Try :
unique(c(a,b,a,c))
On Thu, Aug 27, 2009 at 10:48 AM, mirauta wrote:
>
> Hello,
>
> I have the vector (a,b,a,c) and I trying to obtain it's distinct elements
> in
> another vector.
> Is there a function that can do this?
>
> Thanks,
> Bogdan
> --
> View this message in context:
> http://ww
I'm running into a problem I can't seem to find a solution for. I'm
attempting to add sequences into an existing data set based on subsets
of the data. I've done this using a for loop with a small subset of
data, but attempting the same process using real data (200k rows) is
taking way too long.
Try this;
stuff$row3 <- with(stuff, ave(row1, row2, FUN = seq))
I don't understand the fourth column
On Thu, Aug 27, 2009 at 11:55 AM, Jason Baucom wrote:
> I'm running into a problem I can't seem to find a solution for. I'm
> attempting to add sequences into an existing data set based on subse
Henrique,
That works great! Thanks.
The row3 is a sequence that restarts each time a new row2 is reached.
Row4 is a sequence that restarts each time a new row2 is reached OR row1
reaches some threshold. By setting a threshold of 3, we expect a restart of the
sequence once row1 reaches
I got this to work. Thanks for the insight! row7 is what I need.
> checkLimit <-function(x) x<3
> stuff$row6<-checkLimit(stuff$row1)
> stuff$row7 <- with(stuff, ave(row1,row2, row6, FUN = sequence))
> stuff
row1 row2 row3 row4 row5 row6 row7
1 01111 TRUE1
2
Hello everyone, I would appreciate any help with the following.
My dataset is a list containing matrices. So if you type e.g.
data[[1]]
you get something like:
[,1][,2]
361a AT
456b AG
72145aTG
As you can see my rows have names which are char
Hi Carlos,
how about this step first:
rownames(mydata)<-gsub("361a","00361a",rownames(mydata))
rownames(mydata)<-gsub("456a","00456a",rownames(mydata))
good luck
milton
On Thu, Aug 27, 2009 at 12:27 PM, Carlos Gonzalo Merino Mendez <
carlosgmer...@yahoo.com> wrote:
> Hello everyone, I would ap
On Aug 27, 2009, at 11:58 AM, Jason Baucom wrote:
I got this to work. Thanks for the insight! row7 is what I need.
checkLimit <-function(x) x<3
stuff$row6<-checkLimit(stuff$row1)
You don't actually need those intermediate steps:
> stuff$row7 <- with(stuff, ave(row1, row2, row1 < 3, FU
Hello
On 8/27/09, Josh Roll wrote:
> I am having trouble getting both graphs on the same page. Its
> separating them, especially when i write them to a pdf. I need visual
> comparison capabilities. Do i need to include the two data sets in the same
> "plot" to make this happen. Thanks
>
h
Hi
Assume i have three time series Y, X and Z
and the model is
Y(t) = b1 + b2*X(t) + b3*Z(t) + u(t)
How can I introduce an autoregressive term ar(1) to solve for
serial autocorrelation?
i've been trying with ar(arg1,arg2,arg3) but it only works for
individual series
thanks a lot
--
Gaspar
Hi Carlos,
I think I made a wrong suggestion. Sorry about that.
I was thinking that if you have the same rowname length it helps you on the
data handling. Is it true?! Case yes I can try suggest another automatic way
of you get it.
bests
milton
On Thu, Aug 27, 2009 at 12:39 PM, milton ruser
Roberto,
Try winsor in the psych package.
Bill
At 10:21 AM -0400 8/27/09, Roberto Perdisci wrote:
This is of great help, thanks!
Roberto
On Thu, Aug 27, 2009 at 7:20 AM, Jim Lemon wrote:
Roberto Perdisci wrote:
Hello everybody,
after searching around for quite some time, I haven't
Try this:
lapply(data,
function(r)
lapply(split(r,
substr(sprintf("%05d", as.numeric(gsub("[a-z]", "",
row.names(r, 1, 3)), table))
On Thu, Aug 27, 2009 at 1:27 PM, Carlos Gonzalo Merino Mendez <
carlosgmer...@yahoo.com> wrote:
> Hello everyone, I
Hi Milton,
Thanks for trying to help anyway.
From: milton ruser
Cc: r-help@r-project.org
Sent: Thursday, August 27, 2009 6:48:41 PM
Subject: Re: [R] subset of a matrix
Hi Carlos,
I think I made a wrong suggestion. Sorry about that.
I was thinking that if
Hi Henrique,
I tried your code. I simply copied and pasted it 'cause I have no idea how it
works. What I get is the total number of A's and T's and all other characters,
which was not my intention. Maybe I need to make some modifications to your
script before being able to apply within my scrip
Nevermind, I figured another way through the plot command. thanks :)
On Thu, Aug 27, 2009 at 7:16 AM, Mehdi Khan wrote:
> I am creating a strip plot from the lattice library, and would like the
> display to also have the linear model line through it. How would I do that?
>
> stripplot(jitter(v
How current is the literature? Is the more recent literature using
Mann-Whitney because of inertia rather than best practice?
The Mann-Whitney/Wicoxon test is a special case of a permutation test that has
a shortcut computation. Fast computers were not available when these tests
were develope
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Martin Maechler
> Sent: Thursday, August 27, 2009 1:30 AM
> To: Kenneth Roy Cabrera Torres
> Cc: RHelp
> Subject: Re: [R] math symbol + value of a variable in legend.
>
> >
I'd suggest looking at Rcmdr by John Fox
(http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/). I use it to introduce
anthropology students to R for statistical analyses. It is a graphical user
interface that lets students quickly begin using R to run statistical
analyses. It includes a command window so y
Ah, thanks always -
I originally thought as.chron() was required to have all fields (m/d/y
hh:mm:ss) as for chron() but I see that the former passes its 'format' argument
to as.POSIXct()
Good deal!
Stephen
- Original Message
From: Gabor Grothendieck
To: Stephen Tucker
Cc: Tony Bre
The inconsistency arose in order to satisfy backward compatibility
while giving chron a direct way to use % codes.
chron used its own format specification so it would have been difficult
to add % codes there; however, as.chron, at the time, did not support a
format specification at all so it was s
Try this:
legend("topleft", c(as.expression(bquote(mu == .(m1))),
as.expression(bquote(mu == .(m2)
On Tue, Aug 25, 2009 at 5:30 PM, Kenneth Roy Cabrera Torres <
krcab...@une.net.co> wrote:
> Hi R users:
>
> I will like to have a legend with math symbols and also with
> the value of a variabl
Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of William Dunlap
> Sent: Thursday, August 27, 2009 11:18 AM
> To: Martin Maechler; Kenneth Roy Cabrera Torr
I want the standard error associated with a correlation. I can calculate
using cor & var, but am wondering if there are libraries that already
provide this function.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
http
Quick informal poll: what is everyone's favorite text editor for working
with R? I'd like to hear from people who are using editors that have
some level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks!
--j
--
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Te
And if your students are used to work with Excel (on Windows) and will
have data in Excel, consider RExcel (more info at rcom.univie.ac.at)
which among other things gives you the R Commander menu
as an Excel menu.
Disclaimer: I am the author of RExcel.
David L Carlson wrote:
> I'd suggest lookin
Dear R users,
is there way to ignore an error and go back to 1st line?
I mean,
#---
while (or repeat)
{
1
2
.
.
.
6
}
#-
For example, if I have an error in the 6th line, the
Hi all, I have two functions called test1() and test2(). Now how do I
select one of them in test3()??
Say
test3<-function(func="test1"){
if (func=="test1"){
now.func<-test1()
}
else now.func<-test2()
}
I know this function I wrote does not right. Do an
Hi all, I have two functions called test1() and test2(). Now how do I
select one of them in test3()??
Say
test3<-function(func="test1"){
if (func=="test1"){
now.func<-test1()
}
else now.func<-test2()
}
I know this function I wrote does not right. Do an
Along this same note, are there any editors that have good code completion
(intellisense) capabilities for R? I'll be teaching R to undergraduates this
semester and I imagine having code completion would be helpful.
Andreas Stefik, Ph.D.
Department of Computer Science
Southern Illinois University
Try this:
test1 <- function()cat("Call: Test 1", "\n")
test2 <- function()cat("Call: Test 2", "\n")
test3 <- function(FUN)
match.fun(FUN)
test3("test1")
On Thu, Aug 27, 2009 at 5:39 PM, SH.Chou wrote:
> Hi all, I have two functions called test1() and test2(). Now how do I
> selec
On 8/27/09, Andreas Stefik wrote:
> Along this same note, are there any editors that have good code completion
> (intellisense) capabilities for R? I'll be teaching R to undergraduates this
> semester and I imagine having code completion would be helpful.
>
Personally I find JGR a comfortable co
How can I look up the aspect ratio of a plot, so I can use that to correctly
adjust the angle of text which is supposed to be parallel to a line in the
plot?
The following example code works for a 1:1 aspect ratio, but puts the text
at the wrong angle if the plot region is short and wide or tall a
Am Donnerstag, den 27.08.2009, 15:40 -0500 schrieb Andreas Stefik:
> Along this same note, are there any editors that have good code completion
> (intellisense) capabilities for R? I'll be teaching R to undergraduates this
> semester and I imagine having code completion would be helpful.
JGR[1] is
Is this what you want -- this returns a function that you can then call:
> test1 <- function() 1
> test2 <- function() 2
> test3 <- function(func='test1'){ # return the function to call
+ if (func == 'test1') return(test1)
+ return(test2)
+ }
>
> # test it
> test3()() # default -- notice
Give us the example where 'try' did not work. Something like this should work
while(){
1
2
try.err <- try(...code that might error)
if (try.err, 'try-error') next
3
}
On Thu, Aug 27, 2009 at 4:21 PM, kathie wrote:
>
> Dear R users,
>
> is there way to ignore an error and
Hi all,
Does anybody know the meaning of the values 0 - 1, for each variable from
data "sex2" avaible from the package "logistf"?
Thanks in advance.
Best,
Caio
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https:/
While correct, the solution below is unnecessarily complicated. Functions
can be passed around and used as arguments just like any other objects.
Hence (using Jim's example):
> test3 <- function(func)func
> test3(test1)()
[1] 1
> test3(test2)()
[1] 2
Of course. arguments can be entered in the par
I frequently use R's help facilities and I know about the asp argument to
plot, but this doesn't answer my question. I would like to allow the aspect
to be determined automatically but *query* the aspect ratio for future use.
I suppose one work-around would be to use the data ranges and plot regi
Many thanks to all for resolving my issue!
On Thu, Aug 27, 2009 at 10:33 PM, Martin Maechler <
maech...@stat.math.ethz.ch> wrote:
> > "MO" == Moshe Olshansky
> > on Wed, 26 Aug 2009 23:36:22 -0700 (PDT) writes:
>
>MO> You can do
>MO> for (i in 1:ncol(x)) {names <-
> rownames(
I have a dataset that I'm trying to rearrange for a repeated measures analysis:
It looks like:
patient basefev1 fev11h fev12h fev13h fev14h fev15h fev16h fev17h fev18h drug
201 2.46 2.68 2.76 2.50 2.30 2.14 2.40 2.33 2.20a
202 3.50 3.95 3.65 2.93 2.53 3.04
?reshape
On 28/08/2009, at 11:37 AM, Richardson, Patrick wrote:
I have a dataset that I'm trying to rearrange for a repeated
measures analysis:
It looks like:
patient basefev1 fev11h fev12h fev13h fev14h fev15h fev16h fev17h
fev18h drug
201 2.46 2.68 2.76 2.50 2.30 2.14 2
I suspect reshape() is the function you're looking for; there is also a
reshape package that you might prefer.
It's also quite easy to do this in base R using unlist() and some indexing
with rep, but that may be more than you care to deal with.
Bert Gunter
Genentech Nonclinical Biostatisics
I have a vector of gene symbols, some of which have multiple aliases. In the
case of an alias, they are separated by ' \\\ '.
Here is a real world example, which would represent one element of my
vector:
Eif4g2 /// Eif4g2-ps1 /// LOC678831
What I would like to do is input the vector into a functio
You need a escape before each backslash:
a <- c('a \\ b', 'a \\ b')
cat(a, "\n")
You can write in this form:
strsplit(a, " .*\\.* ")
On Thu, Aug 27, 2009 at 10:03 PM, Mark Kimpel wrote:
> I have a vector of gene symbols, some of which have multiple aliases. In
> the
> case of an ali
For posterity's sake, here is the solution I figured out. Putting the
following lines after the plot(f) command seems to set the angle correctly:
myasp <-
(par("fin")[2]-par("mai")[1]-par("mai")[3])/(par("fin")[1]-par("mai")[2]-par("mai")[4])
(f_angle <- atan(myasp)*180/pi)
(g_angle <- atan(2*mya
Thanks Henrique. I had actually tried using 6 back-slashes but didn't know
to use 'cat' to see the non-escaped representation (see below to see my
original confusion). Your strsplit, of course, works great. Thanks again!
> a
[1] "a \\ b" "a \\ b"
> cat(a)
a \\\ b a \\\ b>
-
The ramps package looks very appealing. I have run the examples in the
package .pdf and gone through the .pdf article at the Journal of Statistical
Software, and am very impressed. Is it possible to see a spatio-temporal
example in R script as well? Thanks.
--
View this message in context:
ht
Hi,
I have a population. Then I have picked one relatively small sub-sample of it
using a particular criterion. The means of the whole population and that of the
sample seems to differ significantly. The distributions are not normal. What is
the right test?
Atte Tenkanen
University of Turku, F
Hi,
I generated a 3-column heatmap, however, I want to have a smaller column
width and big font size of label on the right side.
Thanks!
> sessionInfo()
R version 2.9.1 (2009-06-26)
i486-pc-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETAR
The San Francisco Bay Area useR Group is very excited to host Hadley
Wickham on Sep 17 for our Fall kickoff meeting. Details at
http://www.meetup.com/R-Users/calendar/10446894/
This year we are moving our regular meeting monthly meeting to the 2nd
Tuesday of each month. Also, we hope to rotate the
Dear R-Help subsribers,
upon running into a wonderful ggplot2 package by accident, I abruptly
encountered another problem. Almost every command run with ggplot2 results
in some sort of error. The one below is far the most common one. Kind people
from ggplot2 mailing list couldn't manage to solve
Dear Sir,
Â
Thanks a lot for your solution and guidance. It worked wonderfully.
Â
Regards
Â
Maithili
--- On Thu, 27/8/09, Gabor Grothendieck wrote:
From: Gabor Grothendieck
Subject: Re: [R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS
To: "Maithili Shiva"
Cc: r-help@r-project.org
D
95 matches
Mail list logo