Thank you all for the answers.
So if I may extend on the question -
When is it important to use 'Literal integer'?
Under what situations could not using it cause problems?
Is it a matter of efficiency or precision or both?
Thanks,
Tal
Contact
I have two vectors: both have possible values of 1,-1, or 0
trend1 - c(1,1,1,1,1,1,-1,-1,-1,-1,-1,-1)
trend2 - c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,)
i want to create a third vector that is conditional upon these two vectors:
if (trend2 == 1 trend1 == 1) {position - 1}
elseif (trend2 == -1 trend1==
there are also vectorized logical operators; have a look at the help
page ?'', and try this:
trend1 - c(1,1,1,1,1,1,-1,-1,-1,-1,-1,-1)
trend2 - c(1,1,1,1,1,1,1,1,1,1,1,-1)
position - as.numeric((trend1 == 1 trend2 == 1) | (trend1 == -1
trend2 == -1))
position
I hope it helps.
Best,
Hi,
I think you want ifelse().
Assuming that length(trend2)=12 and not 14 as in the data you provided,
that should work:
position - ifelse((trend1==1 trend2==1)|(trend1==-1
trend2==-1),1,0) #btw, note the single and single |, not double
HTH,
Ivan
Le 2/24/2011 09:41, Kushan Thakkar a
On 02/24/2011 08:37 PM, Dimitris Rizopoulos wrote:
there are also vectorized logical operators; have a look at the help
page ?'', and try this:
trend1 - c(1,1,1,1,1,1,-1,-1,-1,-1,-1,-1)
trend2 - c(1,1,1,1,1,1,1,1,1,1,1,-1)
position - as.numeric((trend1 == 1 trend2 == 1) | (trend1 == -1
On 02/24/2011 08:43 PM, Jim Lemon wrote:
Oops, forgot about the zero!
trunc((trend1 * trend2 + 1)/2)
Jim
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
On Thu, 24 Feb 2011, Tal Galili wrote:
Thank you all for the answers.
So if I may extend on the question -
When is it important to use 'Literal integer'?
Under what situations could not using it cause problems?
Is it a matter of efficiency or precision or both?
Efficiency: it avoids
Thanks all. This works..
On Thu, Feb 24, 2011 at 3:43 AM, Jim Lemon j...@bitwrit.com.au wrote:
On 02/24/2011 08:37 PM, Dimitris Rizopoulos wrote:
there are also vectorized logical operators; have a look at the help
page ?'', and try this:
trend1 - c(1,1,1,1,1,1,-1,-1,-1,-1,-1,-1)
trend2 -
Or simply do :
position - as.numeric(trend1 == trend2 )
position
2011/2/24 Dimitris Rizopoulos d.rizopou...@erasmusmc.nl
there are also vectorized logical operators; have a look at the help page
?'', and try this:
trend1 - c(1,1,1,1,1,1,-1,-1,-1,-1,-1,-1)
trend2 -
On 2011-02-23 19:06, Jie TANG wrote:
hi,R users,
Now I have some scatter figures, is there some method can plot equalprobable
error ellipse ?
It's not clear to me what you mean by 'error ellipse'
but perhaps dataEllipse() in the car package is useful.
Peter Ehlers
Hello all,
This shouldn't be difficult, but I am not able to extract a printed
value from a function and assign it to an object.
In my case,
library(DAAG)
twotPermutation(c(2,3,4),c(3,6,5),plotit=F)
[1] 0.298
I would like to assign this result to an object.
Thanks,
Duarte
On 02/24/2011 11:20 AM, Prof Brian Ripley wrote:
On Thu, 24 Feb 2011, Tal Galili wrote:
Thank you all for the answers.
So if I may extend on the question -
When is it important to use 'Literal integer'?
Under what situations could not using it cause problems?
Is it a matter of efficiency or
This came up at least once before, with regard to where it is
documented:
http://r.789695.n4.nabble.com/Where-are-usages-like-quot-2L-quot-documented-tt831061.html
I haven't looked around much to see if the documentation has changed,
but in a quick look at ?integer I don't see the concept
On 2011-02-23 19:27, Ramya wrote:
Hi there,
b is my dataframe.
I have a dataframe. I am trying to get rid of the -INF values but didnt have
much luck
b[which(is.finite(b))]
I can get rid of it for a single column
b[,1][which(is.finite(b[,2]))] but not for all dataframe I used it inside of
Am Mittwoch, den 23.02.2011, 18:12 +0100 schrieb Juergen Rose:
class.weights=Wts,
I have just seen, that me last code was not complete. I try it once
more:
library(e1071) data(Glass, package = mlbench)
index - 1:nrow(Glass)
testindex - sample(index, trunc(length(index)/5))
testset -
On 2011-02-24 03:26, Duarte Viana wrote:
Hello all,
This shouldn't be difficult, but I am not able to extract a printed
value from a function and assign it to an object.
In my case,
library(DAAG)
twotPermutation(c(2,3,4),c(3,6,5),plotit=F)
[1] 0.298
I would like to assign this result to an
I'm trying to plot some temporal data that have some gaps in them. You
can see the plot here: http://www.tiikoni.com/tis/view/?id=da222e2.
The problem is that during the time gaps in the TS the line plot is
interpolated over the gap and I don't want it to. I've tried
interleaving the gaps with an
On 24/02/2011 7:38 AM, Christos Delivorias wrote:
I'm trying to plot some temporal data that have some gaps in them. You
can see the plot here: http://www.tiikoni.com/tis/view/?id=da222e2.
The problem is that during the time gaps in the TS the line plot is
interpolated over the gap and I don't
Dear Shreyasee,
I had exactly the same error message. I converted the pdf-files into plain
textfiles and reran the command without any problems. I'm no expert but the
problem must be with the readability of the filetype.
Kind regards
Kutsal
--
View this message in context:
Dear all: i have the following problem
I use gls, I have 10 repeated meassures.
The 10 by 10 matrix has different variances in the diagonal (i know how to
handle that)
The correlation matrix is blocked: the first 3 repeated meassures have the
same correlation,
the next 4 have the same
Hi,
I would like to save the plots produced by boa into postscript files in R.
I am struggling- can anyone advise?
Thanks Emma
--
View this message in context:
http://r.789695.n4.nabble.com/boa-library-and-plots-tp3322508p3322508.html
Sent from the R help mailing list archive at Nabble.com.
Hello,
I am training to use the changeLOS package. Using data provided in this
package
(los.data), I want to generate a new plot with overlaying 2 curves of
transition
probability P01 and P03 and also statistically compare the two curves like the
Kaplan-Meier Method.Can someone help me ?
Dear R Help,
I'm using the sampleSelection library to run a heckman model. The default is
to use a probit model for the selection equation. I would like to know if it
is possible to use a clog-log for the selection equation either with the
sampleSelection library or in a different way. Is this
Hi all,
I wish to use rp.tkrplot from the rpanel package with subplots produced
by layout or split.screen. My problem is that I want to use a click
function, but I can't work out how to convert the x and y values it
produces into the values on the plots as unlike for a single plot they
don't
Problem solved:
DF = data.frame(read.table(textConnection(A B C D E
1 1 a 1999 1 0
2 1 b 1999 0 1
3 1 c 1999 0 1
4 1 d 1999 1 0
5 2 c 2001 1 0
6 2 d 2001 0 1
7 3 a 2004 0 1
8 3 b 2004 0 1
9 3 d 2004 0 1
10 4 b 2001 1 0
11 4 c 2001 1
On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote:
On 2011-02-24 03:26, Duarte Viana wrote:
Hello all,
This shouldn't be difficult, but I am not able to extract a printed
value from a function and assign it to an object.
In my case,
library(DAAG)
twotPermutation(c(2,3,4),c(3,6,5),plotit=F)
Hi everybody,
I recently sent out a first message using this tool and was astonished about
the quick and helpful replys. So, thank you in advance for your help, I really
appreciate that!
As already recently mentioned I am new to using R as I have to implement some
decision trees with R
On Feb 24, 2011, at 7:21 AM, emj83 wrote:
Hi,
I would like to save the plots produced by boa into postscript files
in R.
I am struggling- can anyone advise?
?postscript
I see that Nabble omits the standard capitalized suggestion:
PLEASE do read the posting guide
On 2011-02-24 06:32, David Winsemius wrote:
On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote:
On 2011-02-24 03:26, Duarte Viana wrote:
Hello all,
This shouldn't be difficult, but I am not able to extract a printed
value from a function and assign it to an object.
In my case,
library(DAAG)
I don't think that third suggestion actually works:
x - print( twotPermutation(c(2,3,4),c(3,6,5),plotit=F) )
[1] 0.289
NULL
x
NULL
twotPermutation returns the value of invisible() which is NULL:
x - print(invisible())
x
This conflicts with the documented behaviour of twotPermutation which
Hello!
I am wondering if it's possible to run - in sequence - code that is
stored in several R scripts.
For example:
Script in the file code1.r contains the code:
a = 3; b = 5; c = a + b
Script in the file code2.r contains the code:
d = 10; e = d - c
Script in the file code3.r contains the
On Feb 24, 2011, at 10:07 AM, Peter Ehlers wrote:
On 2011-02-24 06:32, David Winsemius wrote:
On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote:
On 2011-02-24 03:26, Duarte Viana wrote:
Hello all,
This shouldn't be difficult, but I am not able to extract a printed
value from a function and
You say you are aware that you can source them from a common script, yet you
don't seem satisfied with that.
Perhaps you could be more specific about why that solution is not satisfactory?
One thing you said could indicate a misunderstanding... you do not have to wrap
the code in functions
If you are just wanting to run them once, you can just do:
source(code1.r)
source(code2.r)
source(code3.r)
or place the file names in a vector, say 'filenames' and:
sapply(filenames, source)
If you want to use them multiple times, try:
run1 - parse(code1.r)
run2 - parse(code2.r)
run3 -
CB == Claudia Beleites cbelei...@units.it
on Thu, 24 Feb 2011 12:31:55 +0100 writes:
CB On 02/24/2011 11:20 AM, Prof Brian Ripley wrote:
On Thu, 24 Feb 2011, Tal Galili wrote:
Thank you all for the answers.
So if I may extend on the question -
When is it
PE == Peter Ehlers ehl...@ucalgary.ca
on Thu, 24 Feb 2011 07:07:29 -0800 writes:
PE On 2011-02-24 06:32, David Winsemius wrote:
On Feb 24, 2011, at 7:22 AM, Peter Ehlers wrote:
On 2011-02-24 03:26, Duarte Viana wrote:
Hello all,
This shouldn't be
Thanks a lot, everyone!
Honestly - I just did not know one could source everything and not
just functions.
What you wrote is simple, but pretty eye-opening for me (and extremely helpful)!
Dimitri
On Thu, Feb 24, 2011 at 10:51 AM, rex.dw...@syngenta.com wrote:
You don't need to write functions
Note however that I've never seen evidence for a *practical*
difference in simple cases, and also of such cases as part of a
larger computation.
But I'm happy to see one if anyone has an interesting example.
E.g., I would typically never use 0L:100L instead of 0:100
in an R script because
Deal all, as MCMClogit does not allow for the specification of several chains,
I have run my model 3 times with different random number seeds and differently
dispersed multivariate normal priors.
For example:
res1 = MCMClogit(y~x,b0=0,B0=0.001,data=mydat, burnin=500, mcmc=5500,
seed=1234,
Dear R-users,
Does anyone know how to do weighted Voronoi diagrams (Dirichlet
tesselation) in R? To be more specific, I have a set of coordinates for
tree locations on a plot, and I'm looking for a way to do the
tesselation so that the polygon size for each tree depends on the size
of the
I want to predict a set of proportions from a linear regression using glm.
The model includes a logit link. However I want to extract the
variance:covariance matrix among the predicted proportions rather than
on the logit scale.
Is there a way to do this using Vcov or a similar package in R?
Dear all,
I am having troubles in using
fitdistr() from MASS package
to fit self-defined distributions.
I try to use it in this simple example
where I want to fit some data to
a Gaussian+Flat distribution:
gaussflat-function(x,sd,k){
res-x
res[ abs(x) = k ] - dnorm(x[ abs(x) = k
If you're in a hurry, it's way easier than that:
t - c(1,2,3,7,8,9,11,12,13)
x - rnorm(length(t))
new.t - min(t):max(t)
new.x - NULL
new.x[t-min(t)+1] - x
plot(new.t, new.x, type='l')
This is wastes max(t)-min(t)-length(t)+1 vector entries, but presumably you
won't be wasting a lot of real
Hi,
I'm new to R, and found this code confusing. It is from the bioconductor
package RpsiXML.
entryCount - length(nodes)
The nodes object is either the argument nor generated in the function.
How can R find the nodes object? What am I missing here?
Thanks
Zheng Jk
parseXmlEntryNodeSet -
You don't need to write functions to source files:
source(code1.R)
source(code2.R)
source(code3.R)
When you source a file with a bunch of function definitions, the definitions
are just assignment statements:
f - function (x)...
g - function (x,y,z) ...
Did you think you would break your
My box plot below is drawing its upper whisker all the way to the last point,
instead of showing the point as an outlier. Am I misunderstanding, or is it a
bug?
Help(boxplot) states for the parameter “range” that “this determines how far
the plot whiskers extend out from the box. If range is
On Thu, Feb 24, 2011 at 6:06 PM, Yan Jiao y.j...@ucl.ac.uk wrote:
Dear R user
How to make the program stop at the spot where the error occurs? I mean
inside the iterations,.
Check
?browser
?debug
Rainer
Many thanks
yan
options(error=utils::recover)
On Thu, Feb 24, 2011 at 12:06 PM, Yan Jiao y.j...@ucl.ac.uk wrote:
Dear R user
How to make the program stop at the spot where the error occurs? I mean
inside the iterations,.
Many thanks
yan
Hi all.
I was having some trouble with a for loop and I found the problem is the
following.
Does anyone have some idea why I got the following R result? Since mone
is equal to 3, why
mu1 only have 2 components?
library(MASS)
p0 - seq(0.1, 0.9,by=0.1)
m - 10
p0 - p0[7]
## data
HW == Hadley Wickham had...@rice.edu
on Thu, 24 Feb 2011 10:14:35 -0600 writes:
Note however that I've never seen evidence for a *practical*
difference in simple cases, and also of such cases as part of a
larger computation.
But I'm happy to see one if anyone has an
On 24/02/2011 9:59 AM, Jk Zheng wrote:
Hi,
I'm new to R, and found this code confusing. It is from the bioconductor
package RpsiXML.
entryCount- length(nodes)
The nodes object is either the argument nor generated in the function.
How can R find the nodes object? What am I missing here?
Hi,
It's FAQ 7.31
Try this:
mone - round(m-mzero)
HTH,
Ivan
Le 2/24/2011 18:31, li li a écrit :
Hi all.
I was having some trouble with a for loop and I found the problem is the
following.
Does anyone have some idea why I got the following R result? Since mone
is equal to 3, why
mu1
You've fallen afoul of rounding error, FAQ 7.31 I believe,
rnorm(3, 0, 1)
[1] -2.0903756 -0.9314351 0.1477768
but
rnorm(mone, 0, 1)
[1] -0.8695359 -0.5429294
because mone is not actually three, but on my linux system a bit less.
mone == 3
[1] FALSE
mone 3
[1] TRUE
You could try
Let me first thank you all for the replies.
Actually I also tried the print() function, and indeed it did not
work. The function capture.output() Peter said did the job.
Thank you for sending the proposition for the new code to the maintainer.
Duarte
On Thu, Feb 24, 2011 at 4:51 PM, Martin
MM == Martin Maechler maech...@stat.math.ethz.ch
on Thu, 24 Feb 2011 18:34:36 +0100 writes:
HW == Hadley Wickham had...@rice.edu
on Thu, 24 Feb 2011 10:14:35 -0600 writes:
Note however that I've never seen evidence for a *practical*
difference in simple cases, and also of
Hi folks,
I am wondering if the following is possible: I want to control the
arguments sent to a function by string variables. For example, instead of
heatmap.2( A, col=greenred(75) )
I would want to have something like:
heatmap.2 ( paste(A, col=greenred(75), sep=,) )
Is this possible to do
Look at ?quantile, especially the detail section on type and the second
reference (and the see also section). There are many different definitions of
quantiles/quartiles and different functions use different versions.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
On Thu, Feb 24, 2011 at 10:03 AM, Duke duke.li...@gmx.com wrote:
Hi folks,
I am wondering if the following is possible: I want to control the arguments
sent to a function by string variables. For example, instead of
heatmap.2( A, col=greenred(75) )
I would want to have something like:
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Martin Maechler
Sent: Thursday, February 24, 2011 7:45 AM
To: Claudia Beleites
Cc: r-help@r-project.org
Subject: Re: [R] The L Word
CB == Claudia Beleites
HI, Dear R community,
I try to create 100 dummy variables like the following:
ack$id_1 - (ack$ID==1)*1
ack$id_2 - (ack$ID==2)*1
..
.
ack$id_100 - (ack$ID==100)*1
I used the following codes:
for(i in 1:100){
ack$id_[i] - (ack$ID==i)*1
}
But only one column
On Feb 24, 2011, at 1:03 PM, Duke wrote:
Hi folks,
I am wondering if the following is possible: I want to control the
arguments sent to a function by string variables. For example,
instead of
heatmap.2( A, col=greenred(75) )
I would want to have something like:
heatmap.2 ( paste(A,
See inline below.
--
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
Is the room still a room when its empty? Does the room,
the thing itself have purpose? Or do we, what's the word... imbue
Thanks to all, appreciated!
On Thu, Feb 24, 2011 at 11:18 AM, Jonathan P Daily jda...@usgs.gov wrote:
See inline below.
--
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
Is the room
On Feb 24, 2011, at 1:23 PM, Changbin Du wrote:
HI, Dear R community,
I try to create 100 dummy variables like the following:
ack$id_1 - (ack$ID==1)*1
ack$id_2 - (ack$ID==2)*1
..
.
ack$id_100 - (ack$ID==100)*1
I used the following codes:
for(i in 1:100){
ack$id_[i] -
Thanks, David!
On Thu, Feb 24, 2011 at 11:30 AM, David Winsemius dwinsem...@comcast.netwrote:
On Feb 24, 2011, at 1:23 PM, Changbin Du wrote:
HI, Dear R community,
I try to create 100 dummy variables like the following:
ack$id_1 - (ack$ID==1)*1
ack$id_2 - (ack$ID==2)*1
..
.
If your ack$ID variable is numeric, you could first turn it into a factor:
myfactor = as.factor(ack$ID)
And then use model.matrix to create dummy variables:
mydummies = model.matrix(~myfactor)[, -1]
You'll get as many dummy variables as values you have in ack$ID -
minus 1 (for the reference
One way to do Dirichlet triangulations is to map point (x,y) to point
(x,y,x^2+y^2) (I think, it's been a while) and then find the convex hull of
these points in 3 dimensions. You can do the Voronoi diagram of circles by
mapping (x,y,r) to (x,y,x^2+y^2-r^2) I would try assigning an r to each
Dear Prof Frank,
I tried to simulate an example data set as close as possible to my own real
data with the codes below. There are only two covariates, tumor(3 levels)
and ecog(3 levels). rx is treatment (4 levels). Validation with the
stratified model (by rx) had a negative R2.. and the R2 under
Hi all,
I have been struggling with this problem for a few days.
I have a data table like this:
gene rpkm1 diff1 rpkm2 diff2
gene1 23 50 13 120
gene2 111 220 827 1200
gene3
Hi R-help,
I am using nnet package in R for neural networks for performing
classification and regression.Is there any command or set of commands in R
which would help to figure out the variable importance of the inputs in the
generated neural network.
Thanks in advance.
Regards,
Raji
--
View
Thanks, Dimitri! It is really cool!
On Thu, Feb 24, 2011 at 11:43 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
If your ack$ID variable is numeric, you could first turn it into a factor:
myfactor = as.factor(ack$ID)
And then use model.matrix to create dummy variables:
Hello all,
I am re-posting my previous question with a simpler, more transparent,
commented code.
I have been ramming my head against this problem, and I wondered if
anyone could lend a hand. I want to make parallel a bootstrap of a
linear mixed model on my 8-core mac. Below is the process
It seems the code I've sent had typos...
Here's a corrected version:
#
x - sapply(1:10, function(i)rnorm(1000))
f - sapply(1:10, function(i)density(x[,i], from=-5,to=5)$y)
grid - density(x[,1], from=-5,to=5)$x
win.graph()
persp(grid, 1:10, f,theta=-50, phi=30,
Hi,
I have two time series; one of annual data and one of monthly data. How do I
plot these on the same plot? I checked out ts.plot(), but it only allows for
different starting times, not different frequencies.
Sincerely,
Gabriel Bergin
gabr...@bergin.se
[[alternative HTML version
Try this:
reshape(x, direction = 'long', varying = list(c(2, 4), c(3, 5)), idvar =
'gene')
On Thu, Feb 24, 2011 at 3:19 PM, fbarreto fbarr...@ucsd.edu wrote:
Hi all,
I have been struggling with this problem for a few days.
I have a data table like this:
gene rpkm1
Exactly as Max said. See the rfcv() function in the latest version of
randomForest, as well as the reference in the help page for that function.
OOB estimate is as accurate as CV estimate _if_ you run straight RF. Most
other methods do not have this feature. However, if you start adding
On 02/24/2011 05:14 PM, Hadley Wickham wrote:
Note however that I've never seen evidence for a *practical*
difference in simple cases, and also of such cases as part of a
larger computation.
But I'm happy to see one if anyone has an interesting example.
E.g., I would typically never use
I'm not a Windows user, but if win.graph is like other output device
calls, it would need a dev.off() to close it. When I do it with pdf()
and close with dev.off() I get ten pages, each with a density that is
consistent with what should be seen with rnorm() as input.
--
David.
On Feb
On 2011-02-24 08:18, Andrea Storto wrote:
Dear all,
I am having troubles in using
fitdistr() from MASS package
to fit self-defined distributions.
I try to use it in this simple example
where I want to fit some data to
a Gaussian+Flat distribution:
gaussflat-function(x,sd,k){
res-x
On Feb 24, 2011, at 3:06 PM, Eduardo de Oliveira Horta wrote:
It seems the code I've sent had typos...
Here's a corrected version:
#
x - sapply(1:10, function(i)rnorm(1000))
f - sapply(1:10, function(i)density(x[,i], from=-5,to=5)$y)
grid - density(x[,1],
Thanks a lot!
Regards,
Eduardo
On Thu, Feb 24, 2011 at 6:47 PM, David Winsemius dwinsem...@comcast.net wrote:
On Feb 24, 2011, at 3:06 PM, Eduardo de Oliveira Horta wrote:
It seems the code I've sent had typos...
Here's a corrected version:
#
x -
I would suggest asking this question on r-sig-geo.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 2/18/11 10:44 AM, Leonardo Monasterio leonardo.monaste...@gmail.com
wrote:
Dear R-users,
Is there any way of
I am trying to combine two columns in a data frame into one column. Some
values in either column are missing, but not in the same row for the two
different columns. Additionally, when both columns in a row contain data,
the data are identical. I want a new column with the identical data or the
I think the easiest way is probably
data$z - rowMeans(data[, c(x, y)], na.rm=TRUE)
Best,
Ista
On Fri, Feb 25, 2011 at 12:12 AM, Andrew Anglemyer
andrew.anglem...@gmail.com wrote:
I am trying to combine two columns in a data frame into one column. Some
values in either column are missing, but
Thanks! Unfortunately, in my effort to simply the question, I didn't really
adequately describe the problem. This solution is perfect in the numeric
case I presented, but what about in the case of character classes! Let me
try again:
I have
character.data
id xy
1
Andrew -
I believe
character.data$z = ifelse(is.na(character.data$x),
character.data$y,character.data$x)
should do what you want.
- Phil Spector
Statistical Computing Facility
What about:
ifelse(is.na(x), y, x)
as long as x and y are always the same where one is not NA.
Sarah
On Thu, Feb 24, 2011 at 7:53 PM, Andrew Anglemyer
andrew.anglem...@gmail.com wrote:
Thanks! Unfortunately, in my effort to simply the question, I didn't really
adequately describe the
Thanks for all the solutions!
On Thu, Feb 24, 2011 at 5:37 PM, Sarah Goslee sarah.gos...@gmail.comwrote:
What about:
ifelse(is.na(x), y, x)
as long as x and y are always the same where one is not NA.
Sarah
On Thu, Feb 24, 2011 at 7:53 PM, Andrew Anglemyer
andrew.anglem...@gmail.com
On Thu, Feb 24, 2011 at 3:13 PM, Gabriel Bergin gabr...@bergin.se wrote:
Hi,
I have two time series; one of annual data and one of monthly data. How do I
plot these on the same plot? I checked out ts.plot(), but it only allows for
different starting times, not different frequencies.
Try
Notice that
mone-3
[1] -8.881784e-16
on my machine so, no, mone is actually less than 3, which truncates to 2.
This is an overcomplicated version of R FAQ 7.31, which is mentioned in the
posting guide referenced at the end of every R-help message.
How can I dynamically use a variable as the name for another variable?
I realize this sounds cryptic, so an example is best:
#Start with an array of codes
codes - c(a1, b24, q99)
#Each code has a corresponding matrix (could be vector)
a1 - matrix(rnorm(100), nrow=10)
b24 - matrix(rnorm(100),
Hi all,
I'm trying to figure out the effective differences between BFGS and L-BFGS-B
are, besides the obvious that L-BFGS-B should be using a lot less memory,
and the user can provide box constraints.
1) Why would you ever want to use BFGS, if L-BFGS-B does the same thing but
use less memory?
Dear R people
Could you please help with following
Trying to compare accuracy of tumor size evaluation by different
methods. So data looks like
id true metod1 method2 ...
1 22 2.5
2 1.5 2 2
3 22 2
etc.
Could you please give a hint how to deal with that.
Seems
In terms of a reproducible example:
ProbeSet.ID.F ProbeSet.ID Feature.ID Gene.Symbol X0030V120810.4
X0143V120110.4 X0258V111710.4 X0283V111710.4 X0430V120710.4 X0472V111610.4
X0520V111610.4 X0546V113010.4 X0578V111810.4 X0624V111810.4
7896741_479302 7896741 479302 OR4F17
Hello all,
I am currently attempting to replicate data from a political science article
that utilized a Markov chain transition model to predict voter turnout
intention at time *t*; the data was separated into two different models
based on whether prior intent was to vote or not to vote. The
Hi List,
I have a question to calculate probability using R.
There are 491 boxes and 142 balles. If the ball randomly put into the
box. How to calculate the probability of six or more there are in one
box?
I have try :
dbinom(6,142,1/491)
1-pbinom(6,142,1/491)
But I think I have some unclear
Hello,
I'm fairly new to R. I'm a chemist, not a programmer so please bear with me.
I have a large data.frame that I want to break down (subset) into smaller
data.frames for analysis. I would like to give the data.frames descriptive
names which I have stored in a character vector. My
Hi Guys
In order to look at a dense plot I would like to have the capability
to plot dynamic/interactive. Before I try rgobi which I heard can help
me; I would like to take your opinion.
Thanks!
-Abhi
__
R-help@r-project.org mailing list
Hi all,
Within a foreach loop with doSNOW, we cant call functions which come from
the non-default package. We need to load(require/library) the package once
more within the foreach loop. Anyone knows why would happen like this? Is it
caused by the snow package and something happened when snow
99 matches
Mail list logo