Hello,
Another quote from the help pages that could be usefull is, from ?subset,
Warning
This is a convenience function intended for use interactively. For
programming it is better to use the standard subsetting functions like
[, and in particular the non-standard evaluation of argument subse
Hi everybody!
I do at this time PCA. Everything was going good, I have got good results.
Now I want make a plot. You can see it on the next image:
http://r.789695.n4.nabble.com/file/n4636840/Forum.jpg
For this plot I use the simple biplot function.
Now, it is not exactly what I want. I prefer t
Hi,
Here i have an matrix
mydat <-
ABCXYZ
- --
12 6
6 50
90 100
55 85
100 25
i need to find the " NTH percentile " [result should be in column-wise].
here i have a code for NTH percenile,
For eg:- if i need 20th-percentile then,
qu
Thank you!
Problem solved! There where two identical observations.
--
View this message in context:
http://r.789695.n4.nabble.com/duplicate-couples-time-id-Problem-tp4636316p4636841.html
Sent from the R help mailing list archive at Nabble.com.
__
R-he
It looks to me like the following
should do what you want:
f2 <- function(dotot) array(FALSE, c(dotot, 1))
What am I missing?
Pat
On 17/07/2012 21:58, Johan Henriksson wrote:
thanks for the link! I should read it through. that said, I didn't find
any good general solution to the problem so he
On Wed, Jul 18, 2012 at 12:30 AM, Kjetil Halvorsen
wrote:
> Venables & Ripley:
> "Modern Applied Statistics with S (fourth Edition)"
>
[..]
>
> On Sat, Jul 14, 2012 at 4:01 PM, Larry White wrote:
>> I'm looking for a single book that provides a deep, yet readable
>> introduction to applied data a
Hi everybody.
I'll first explain my problem and what I'm trying to do.
Admit this example:
I'm working on 5 different weather stations.
I have first in one file 3 of these 5 weather stations, containing their
data. Here's an example of this file:
DF1 <- data.frame(station=c("ST001","ST004","ST00
On Jul 18, 2012, at 05:11 , darnold wrote:
> Hi,
>
> I see a lot of folks verify the regression identity SST = SSE + SSR
> numerically, but I cannot seem to find a proof. I wonder if any folks on
> this list could guide me to a mathematical proof of this fact.
>
Wrong list, isn't it?
http://
Hello,
I believe that the answer to your final question is yes but you are
making a really big confusion of what you want, of how you are
explaining it and of the way R works.
First, I have written a function to read the data from the post, without
creating a disk file. In order to be comple
Hello,
Try the following.
colQuant <- function(x, probs= seq(0, 1, 0.25), na.rm = FALSE,
names = TRUE, type = 7, ...){
apply(x, 2, quantile, probs = probs, na.rm = na.rm, names = names, type
= type, ...)
}
mat <- matrix(rnorm(12), 4)
colQuant(mat, 0.20)
colQuant(mat, c(0.20, 0.5))
Hello,
Em 18-07-2012 09:06, Patrick Burns escreveu:
It looks to me like the following
should do what you want:
f2 <- function(dotot) array(FALSE, c(dotot, 1))
What am I missing?
That matrix is even faster?
f2 <- function(dotot) array(FALSE, c(dotot, 1))
f3 <- function(dotot) matrix(FALSE,
On 07/17/2012 11:55 PM, cm wrote:
Any reason I'd get an error like this?
Error in if (round(pos[o + 1]) == (pos[o + 1] - 0.4)) { :
missing value where TRUE/FALSE needed
but when i do it individually, out of the for loop,
(round(pos[o+1])==(pos[o+1]-.4) )
65
TRUE
Elementary, my dear cm.
Hi Jeff,
looks like a job for ?rbind and ?merge
merge(rbind(DF1,DF2),DF3)
hth
Am 18.07.2012 10:21, schrieb jeff6868:
> Hi everybody.
>
> I'll first explain my problem and what I'm trying to do.
> Admit this example:
> I'm working on 5 different weather stations.
> I have first in one file 3 o
Hello Everyone
I have the data long format and I want to draw the contour plot with it
x1 x2 x3
0 12
0 21
0 35
1 14
1 22
1 33
when I am using contour(x1,x2,x3,col=heat.colors) or fill.contour
its giving me an error that increasing x and y expected
So please
On 18/07/2012 09:49, Rui Barradas wrote:
Hello,
Em 18-07-2012 09:06, Patrick Burns escreveu:
It looks to me like the following
should do what you want:
f2 <- function(dotot) array(FALSE, c(dotot, 1))
What am I missing?
That matrix is even faster?
Depends on your unstated version of R
hELLO,
There was no nedd to change the names of the variables inside the
fucntion. What was going on s that in this new file column 'dtime'
doesn't exist. Since column 'clock' exists in all files, I've changed
the function once again, making it more general.
Note that there is an argument 'c
On Tue, Jul 17, 2012 at 12:31:38PM +0200, Peppe Ricci wrote:
> Hi guys,
>
> I need some help to analyzing my data.
> I start to describe my data: I have 21 matrices, every matrix on the
> rows has users and on columns has items, in my case films.
> Element of index (i, j) represent the rating expr
On Wed, Jul 18, 2012 at 11:38:59AM +0200, Petr Savicky wrote:
> On Tue, Jul 17, 2012 at 12:31:38PM +0200, Peppe Ricci wrote:
> > Hi guys,
> >
> > I need some help to analyzing my data.
> > I start to describe my data: I have 21 matrices, every matrix on the
> > rows has users and on columns has it
Hi there.
I have been plotting some circles using 'symbols', with radii representing my
data, but the radii looked incorrect.
It seems to happen with a single circle too:
Symbols ( 0, 0, circles = 40, xlim = c(-40, 40), ylim= c(-40, 40))
If I put a ruler up to my monitor (technology!) to co
Hello,
Follow the code below and see what's the right way:
d <- read.table(text="
x1 x2 x3
0 12
0 21
0 35
1 14
1 22
1 33
", header=TRUE)
x3 <- matrix(d[, "x3"], ncol=2)
levels <- sort(unique(x3))
contour(0:1, 1:3, t(x3), levels=levels)
Hope this helps,
Ru
"merge" is enough for me, thanks!
I was thinking about a loop, or a function like "grep", or maybe another
function.
I'll have to think easier next time!
Thanks again!
--
View this message in context:
http://r.789695.n4.nabble.com/duplicate-data-between-two-data-frames-according-to-row-names-tp4
what is the problem?
gr
-Messaggio originale-
From: Kjetil Halvorsen
Sent: Wednesday, July 18, 2012 1:01 AM
To: Peppe Ricci
Cc: r-help@r-project.org
Subject: Re: [R] Problem creation tensor
Amusing that someone named RICCI is asking about tensors
(sorry!)
Kjetil
On Tue, Jul 17,
On 07/18/2012 08:02 PM, Stuart Leask wrote:
Hi there.
I have been plotting some circles using 'symbols', with radii representing my
data, but the radii looked incorrect.
It seems to happen with a single circle too:
Symbols ( 0, 0, circles = 40, xlim = c(-40, 40), ylim= c(-40, 40))
If I put a
Dear R helpers,
I have a data.frame as given below -
dat1 = data.frame(date =
as.Date(c("3/30/12","3/29/12","3/28/12","3/27/12","3/26/12",
"3/23/12","3/22/12","3/21/12","3/20/12",
"3/30/12","3/29/12","3/28/12","3/27/12",
"3/26/12","3/23/12","3/22/12","3/21/12","3/20/12",
"3/30/12","3/29/12","3
Hi Akhil,
in addition to Rui's post, here is a solution using lattice graphics.
tmp<-read.table(textConnection("x1 x2 x3
0 12
0 21
0 35
1 14
1 22
1 33"),header=T)
library(lattice)
contourplot(x3~x1*x2,tmp)
hth.
Am 18.07.2012 11:23, schrieb Akhil dua:
> Hello
Hello,
Now I don't understand. Inline
Em 18-07-2012 11:56, Akhil dua escreveu:
why are you writing ncol=2 ?
I have levels=100 for x1 and the x1 is my z matrix
In your contour instruction x3 is the z matrix, not x1. And your dataset
shows a 2x3 grid, hence ncol=2, for (x1 times x2) 0:1x1:3.
Hi
I think/hope there will be a simple solution to this but google-ing has
provided no answers (probably not using the right words)
I have a long data frame of >2 000 000 rows, and 6 columns. Across this
there are 24 000 combinations of gene in a column (n=12000) and gender in a
column (n=2... obv
Hi all,
I'm working on a function that reads online data that is only available to
certain IPs. It then writes a subset of the data into a file.
So whenever I'm logged in elsewhere or am not connected to the internet, I get
an error, and the function is terminated.
I want it to rather print a
Dear Mr Rui Barradas,
Thanks a lot for your wonderful suggestion. It worked and will help me
immensely in future too. Really heartfelt thanks once again.
Vincy
--- On Wed, 7/18/12, Rui Barradas wrote:
From: Rui Barradas
Subject: Re: [R] How to have original (name) order after melt and cast c
Hello,
Try the following.
# This is your code
df_sorted = df[order(as.Date(df$date, "%m/%d/%Y"), decreasing = TRUE),]
# This is my code
nams <- as.character(unique(dat1$name))
nums <- sapply(nams, function(nm) which(names(df_sorted) %in% nm))
df_sorted[, sort(nums)] <- df_sorted[, nams]
names(d
Helo,
All problems should be easy.
d <- read.table(text="
gene variable value gender line rep
1 CG1 X208.F1.30456 4.758010 Female 208 1
2 CG1 X365.F2.30478 4.915395 Female 365 2
3 CG1 X799.F2.30509 4.641636 Female 799 2
4 CG1 X306.M2.32650 4.550676 Male 306 2
5 CG1 X712.M2.3
On Wed, Jul 18, 2012 at 6:42 AM, Jim Lemon wrote:
> On 07/18/2012 08:02 PM, Stuart Leask wrote:
>>
>> Hi there.
>>
>> I have been plotting some circles using 'symbols', with radii representing
>> my data, but the radii looked incorrect.
>>
>> It seems to happen with a single circle too:
>>
>> Symb
On 07/18/2012 09:42 PM, Sarah Goslee wrote:
On Wed, Jul 18, 2012 at 6:42 AM, Jim Lemon wrote:
On 07/18/2012 08:02 PM, Stuart Leask wrote:
Hi there.
I have been plotting some circles using 'symbols', with radii representing
my data, but the radii looked incorrect.
It seems to happen with a s
# MCT ordered by the second column of MCT, from smallest to largest values
MCT[order(MCT[, 2]), ]
Jean
Trying To learn again wrote on 07/17/2012
04:42:24 PM:
> Hi all,
>
> I want to order a series that is included on the second column in
MCT.csv.
>
> I do but R doesn´t order, could be beca
On 07/18/2012 10:11 PM, Jim Lemon wrote:
On 07/18/2012 09:42 PM, Sarah Goslee wrote:
On Wed, Jul 18, 2012 at 6:42 AM, Jim Lemon wrote:
On 07/18/2012 08:02 PM, Stuart Leask wrote:
Hi there.
I have been plotting some circles using 'symbols', with radii
representing
my data, but the radii looke
I have my own function for doing this that is similar to the one presented
below. Others may have other ideas that work better. As a general rule, I
would caution against writing out just the label without the variable name.
The only reason I see to separate the labels and names is if you are
What i have is a for loop to name files. I want it to skip over the file if it
doesn't exist. Is there a way to do that?
s=seq(from = chron("03/15/2012"), to = chron("06/15/2012"))
day=format(as.Date(s), "%Y%m%d")
for (k in 1:length(day)){
B1=read.csv(paste("S:/file_", day[k], ".csv", sep=""))
Da
Dear R users,
I am new to lattice but am trying to get to grips with it.
I need to add contour lines for the topography to a plot I created with spplot.
The topography is available as a
SpatialPixelsDataFrame object Z_sfc. If I plot it as spatial lines, after
converting to a SpatialLines objec
Here is an example of how to do it.
> library(survival)
> vfit <- coxph(Surv(time, status) ~ celltype + trt, data=veteran)
> userinput <- data.frame(celltype="smallcell", trt = 1)
> usercurve <- survfit(vfit, newdata=userinput) #the entire predicted
survival curve
> user2 <- summary(usercurve,
Marc gave the referencer for Schoenfeld's article. It's actually quite
simple.
Sample size for a Cox model has two parts:
1. Easy part: how many deaths to I need
d = (za + zb)^2 / [var(x) * coef^2]
za = cutoff for your alpah, usually 1.96 (.05 two-sided)
zb = cutoff for pow
What is the R code to check whether data series have outliers or not?
Thanks,
Sajeeka Nanayakkara
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the pos
Ok, thank you Dan!
I was already afraid that I would get this answer. I will solve it by
defining date/time both as a date/time object and as a character object ( in
another column)
Regards,
Sandy
--
View this message in context:
http://r.789695.n4.nabble.com/read-mignight-as-24-00-and-not-as-
Hello,
I have the following loop for two data sets: diveData_2008 and
diveData_2009. It uses two other data: diveCond_all and fishTable. The
problem is at the point to identify the dive_id for the given index (index
is timestamp). It keeps on saying
for the1st loop
Error in fishReport$dive_id[i] <
Dear R-list,
I have a data set (in the following example called "a") which have:
one "subject indicator" variable (called "id")
three dependent variables (varD, varE, var F)
three independent variables (varA, varB, varC)
I want to fit 9 lme models, one per posible combination (DA, DB, DC, E
Hello.
I have an ordered dependent variable (scale 0 - 3), 5 measurement points. I
am afraid I have strong ceiling effects in my data, and would like to plot
the data (trajectories).
However, you know that plotting ordered variables isn't really feasible.
My question: would you think it appropri
On 18/07/2012 8:27 AM, bunnylove...@optonline.net wrote:
What i have is a for loop to name files. I want it to skip over the file if it
doesn't exist. Is there a way to do that?
s=seq(from = chron("03/15/2012"), to = chron("06/15/2012"))
day=format(as.Date(s), "%Y%m%d")
for (k in 1:length(day))
checkforoutliers <- function(series)NULL
Cheers,
Bert
*Explanation: There is no such thing as a statistical outlier -- or,
rather,"outlier" is a fraudulent statistical concept, defined arbitrarily
and without scientific legitimacy. The typical unstated purpose of such
identification is to remove
I think you'll need to roll your own using tryCatch() around open().
Michael
On Jul 18, 2012, at 5:09 AM, Berry Boessenkool
wrote:
>
>
> Hi all,
>
> I'm working on a function that reads online data that is only available to
> certain IPs. It then writes a subset of the data into a file.
>
On 14.07.2012 00:41, Julien Salanie wrote:
I have a read a lot about the benefits of vectorization in R. I have a
program that takes "almost forever" to run. A good way to see if I have
learned something ... My problem can be summarized like this : I have a
nonlinear function of several variables
On 17.07.2012 21:34, abhisarihan wrote:
I am trying to install custom packages upon starting R. A lot of the code
that is written by us right now is available for editing to the users. To
try and protect the code, I am packaging the production level code and
having the users install it on their
abhisarihan,
Please don't crosspost!
http://stackoverflow.com/questions/11530800/installing-packages-from-rprofile-site-file
Thanks,
Garrett
On Tue, Jul 17, 2012 at 2:34 PM, abhisarihan wrote:
> I am trying to install custom packages upon starting R. A lot of the code
> that is written by us ri
I would like to know how to use the keep parameter in the step function. Or
the way to always keep one of my Xs, and the other Xs to be keep or not by
step forward method.
Thank you all
Mati Bielawski
[[alternative HTML version deleted]]
__
R-he
On 18.07.2012 18:03, Mati Bielawski wrote:
I would like to know how to use the keep parameter in the step function. Or
the way to always keep one of my Xs, and the other Xs to be keep or not by
step forward method.
See ?step and in particular the "lower" part of its scope argument:
step(
To further what Bert says:
You would almost certainly prefer to use robust statistics than
"outlier detection".
I believe Greg Snow's TeachingDemos package has a data set "outliers"
suggesting some of the perils of doing things the outlier-removal way.
Best,
Michael
On Wed, Jul 18, 2012 at 9:14
> >> What is the R code to check whether data series have
>>> outliers or not?
In case noone else has pointed you there, you could try the 'outliers' package.
That contains some of the 'standard' methods of outlier testing for univariate
data.
What you do with them when you find them is a
On 18/07/2012 10:14 AM, Bert Gunter wrote:
checkforoutliers <- function(series)NULL
Cheers,
Bert
*Explanation: There is no such thing as a statistical outlier -- or,
rather,"outlier" is a fraudulent statistical concept, defined arbitrarily
and without scientific legitimacy. The typical unstated
> Bert Gunter
> on Wed, 18 Jul 2012 07:14:31 -0700 writes:
> checkforoutliers <- function(series) NULL
> Cheers, Bert
> *Explanation: There is no such thing as a statistical
> outlier -- or, rather,"outlier" is a fraudulent
> statistical concept, defined arbitrari
I'm not sure why, but lme() doesn't seem to like the variables to be
referenced as part of a list using [ or $.
Here's an easy workaround ...
ids <- a$id
for(i in 2:4){
for(j in 5:7){
y <- a[, j]
x <- a[, i]
lme(y ~ x , random= ~1|ids, na.action="na.exclude")
}}
J
David, thanks a lot!
I tried x[-1] myself but forgot to delete 'group' from the keyby
statement - this explains why it did not work for me.
This is amazing - just 2 lines instead of my many-many.
Great learning!
Dimitri
On Tue, Jul 17, 2012 at 10:49 PM, David Freedman wrote:
> Honestly, I wasn't
At 00:10 18/07/2012, eeste...@ualg.pt wrote:
Dear All,
I'm having trouble tweaking a forest plot made using the R
meta-analysis package metafor. I did the analysis based upon the
correlation coeff from studies and plotted the corresponding forest
plot easily
q2<-rma(yi,vi,mods=cbind(grupo),dat
What is the function index() that you use in this line of code?
thisIndex <- as.character(index(diveData_2008[i,]))
Is it from some package? Or a function you wrote yourself?
I'm trying to run the code you submitted, but I don't have a function
called index().
Jean
Yolande Tra wrote on 07/18
it is a function from library(xts)
On Wed, Jul 18, 2012 at 1:15 PM, Jean V Adams wrote:
> What is the function index() that you use in this line of code?
> thisIndex <- as.character(index(diveData_2008[i,]))
>
> Is it from some package? Or a function you wrote yourself?
> I'm trying to run the
Hello,
Try the following.
for(i in 1:dim(diveData_2008)[1]){
# Which dive is this observation from
thisIndex <- as.character(index(diveData_2008[i,]))
thisIndex <- as.POSIXct(thisIndex)
dive_id <- diveCond_all$dive_id[diveCond_all$timestamp == thisIndex]
#
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Sajeeka Nanayakkara
> Sent: Wednesday, July 18, 2012 6:28 AM
> To: r-help@r-project.org
> Subject: [R] R code for to check outliers
>
>
>
>
>
> What is the R code to check w
Dear R users,
I have a city map in shape file (polygon). I also have some points that I
hope to plot them to the city map. The only information I have about those
points are their relative longitude and latitude to the city center by
miles. Is there a way that R can help me to do this? Thanks.
Ga
Thank you Rui. Very helpful. Yolande.
On Wed, Jul 18, 2012 at 1:37 PM, Rui Barradas wrote:
> Hello,
>
> Try the following.
>
>
> for(i in 1:dim(diveData_2008)[1]){
> # Which dive is this observation from
> thisIndex <- as.character(index(diveData_**2008[i,]))
> thisIndex <- as.PO
Hi Terry, Greg, and Marc,
Thanks for your advice about this. I think I have a pretty good starting point
now for the analysis.
Appreciate your help.
Paul
--- On Wed, 7/18/12, Terry Therneau wrote:
From: Terry Therneau
Subject: Re: [R] Power analysis for Cox regression with a time-varyin
Hi all,
I am also confused about the manual:
a. The input arguments:
wt.method are the weights case weights (giving the relative importance of
case, so a weight of 2 means there are two of these) or the inverse of the
variances, so a weight of two means this error is half as variable
Hello,
You're right. I had thought of this, and I believe there's a day when it
happens to have a zero in the middle of the day. R doesn't allow
conditions like the one you've written but it does allow multiple
conditions, combined using the logical connectives, 'not' - '!', 'or' -
'|' and 'a
Hi,
On Wed, Jul 18, 2012 at 2:11 PM, Gary Dong wrote:
> Dear R users,
>
> I have a city map in shape file (polygon). I also have some points that I
> hope to plot them to the city map.
What projection is the shape file in? Have you successfully imported
it into R yet?
This page has a nice overv
Thanks, Sara.
For your first question:
Geographic Coordinate System: GCS_North_American_1983_HARN
Projected Coordinate System:
NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl
I have imported the shp file in R by read.shaplefiles().
For your second question:
1) by relative long and la
Hello,
Inline
Em 18-07-2012 18:44, Nordlund, Dan (DSHS/RDA) escreveu:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Sajeeka Nanayakkara
Sent: Wednesday, July 18, 2012 6:28 AM
To: r-help@r-project.org
Subject: [R] R code for to
Jim,
Thanks.
It wasn't sure if merely overriding the options function by placing one in
the global environment would guarantee it would be the one actually called.
In any case, I didn't know how to identify the caller. This is quite helpful
and looks promising. I'll give it a try.
DAV
-
Try using trace(), as in
trace(options, quote(print(as.list(sys.calls()
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 David A Vavra
> Sent: Wednesday, July 18, 20
On 2012-07-18 04:27, Rui Barradas wrote:
Helo,
All problems should be easy.
d <- read.table(text="
gene variable value gender line rep
1 CG1 X208.F1.30456 4.758010 Female 208 1
2 CG1 X365.F2.30478 4.915395 Female 365 2
3 CG1 X799.F2.30509 4.641636 Female 799 2
4 CG1 X306.M2.326
Oh, I clearly misunderstood what you were doing there. I don't know anything
about Manhattan plots but a quick google for "manhattan plot r package" turns
up a number of items so the type of plot you want may already exist.
Sorry to not be of more help.
John Kane
Kingston ON Canada
> -
hi,
i am new to using R, so if u can help me in merging my csv file having
different sheets .if u can help me with the commands for it.
regards
karan
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.e
Hi nice people,
i am trying to made a double "for" cycle, i wish that for cycle on k
activates t times the for cycle on s
the first cycle is this:
s<-rep(1,10)
s
[1] 1 1 1 1 1 1 1 1 1 1
> for (n in 2:10) {
+ s[n]=1+s[n]+rnorm(1,mean=0,sd=1)
+ }
> s
[1] 1 4.75 4.86 4.05 4.09 4.56 4.63 4.65 4
I am trying to assign increasing trip numbers to a binary variable ("land";
1=home and 0=away) where a string of 1's shouldn't increment the trip_no
more than once.
For example; based on
land<-c(0,0,0,0,1,1,1,0,0,0,1,1,0,0,0,0)
the "trip_no" sequence produced should be 1,1,1,1,2,2,2,2,2,2,3,3,
Thank you! I had to make some modifications since my data is between a data
set and a subset not one data set to itself, but I was able to use
essentially your method to get it working.
I did have some trouble with the matrix command on the last line - it kept
returning lots of NAs. So I just
Hello, I need to subset my data to only look at the parts that have "holes"
in it. I already have a formula to get rid of inconsistencies, but now I
need to look only at the problem data to reconfigure it. In my data set
where there are multiple "cycles" per "patient," and I want to highlight
the p
Anyone knows how to convert a deldir$delsgs to a X3D IndexedTriangleSet?
Are there already any functions/packages?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do r
# Hi all,
# consider the following code (please, run it:
# it's fully working and requires just few minutes
# to finish):
require(CreditMetrics)
require(clusterGeneration)
install.packages("Rdonlp2", repos= c("http://R-Forge.R-project.org";,
getOption("repos")))
install.packages("Rsolnp2", repos=
Yes,
I would be interested in both the ggplot2 and lattice ways of doing
this. Unfortunately, I am not interested in creating a panel for each
chromosome. Actually, I would like to create a Manhattan plot using
xyplot. Thus I would need to alternate tick marks and tick labels.
Thanks!
On Mon,
# Whoops! I have just seen there's a little mistake
# in the 'sharpe' function, because I had to use
# 'w' array instead of 'ead' in the cm.CVaR function!
# This does not change the main features of my,
# but you should be aware of it
---
# The function to be minimized
sharpe <- function(w) {
Thanks,
in a way this has worked... with a slight modification to this:
narrow3<-aggregate(narrow2$value~narrow2$gene+narrow2$gender,data=narrow2,mean)
narrow4<-aggregate(narrow2$value~narrow2$gene+narrow2$gender,data=narrow2,sd)
which gives a table of the 24000 gene&gender means (narro
Hi
Try this:
mydat <-read.table(text="
ABC XYZ
12 6
6 50
90 100
55 85
100 25
",sep="",header=TRUE)
apply(mydat,2,quantile,probs=0.2)
ABC XYZ
10.8 21.2
A.K.
- Original Message -
From: Rantony
To: r-help@r-project.org
Cc:
Sent: Wednesda
Hi,
You could use "merge", "join" etc.
merge(DF3,DF2)
# station lat lon data
#1 ST002 41 2 3
#2 ST003 42 3 7
library(plyr)
join(DF3,DF2,type="inner")
Joining by: station
# station lat lon data
#1 ST002 41 2 3
#2 ST003 42 3 7
#or
join(DF3,DF2,type="right")
Ho
I am trying to run the cspade function in the arulesSequences package in R.
After I successfully read in my transactions using read_baskets, I try to
execute the cspade function against the transactions object I read in.
However, when I execute the command, I obtain an error: system invocation
fa
got it... another merge did the trick
narrow6<-merge(narrow2,narrow5,by=c("gene","gender"))
Thanks for the help Rui
--
View this message in context:
http://r.789695.n4.nabble.com/Mean-of-matched-data-tp4636856p4636877.html
Sent from the R help mailing list archive at Nabble.com.
__
Thanks a lot, it works fine with me !!
François Maurice
De : "Nutter, Benjamin"
À : Francois Maurice ; r-help@r-project.org
Envoyé le : mercredi 18 juillet 2012 8h21
Objet : RE: [R] Variable labels
I have my own function for doing this that is similar to the one presented
below. Others may
Dear list,
I have a big deal concerning the development of a Taylor expansion.
require(Matrix)
e1 <- as.vector(1:5)
e2 <- as.vector(6:10)
in order to obtain all the combinations between these two vectors following
a Taylor expansion (or more simply through a Maclaurin series) for real
numbe
HI,
Check this link:
http://stackoverflow.com/questions/1444306/how-to-use-outlier-tests-in-r-code
Hope it would be helpful.
A.K.
- Original Message -
From: Sajeeka Nanayakkara
To: "r-help@r-project.org"
Cc:
Sent: Wednesday, July 18, 2012 9:27 AM
Subject: [R] R code for to check out
Nice! It works. Thank you, Rui
There's something that takes me back to the original question, though. The code
takes the first value that meets the critical condition (light ==0); however,
this value can appear more than once a day because these animals nest in dark
caves, and once they are in
On Wed, Jul 18, 2012 at 7:41 PM, Gary Dong wrote:
> For your second question:
> 1) by relative long and lat, I mean distances to the city center from
> south-north and east-west directions.
> 2) I know the coordinate of the reference point.
The problem here is that going 10 miles north along a
Hi Jean,
Is there something missing in the function?
ids <- a$id
for(i in 2:4){
for(j in 5:7){
y <- a[, j]
x <- a[, i]
model<-lme(y ~ x , random= ~1|ids, na.action="na.exclude")
}}
summary(model)
Linear mixed-effects model fit by REML
Data: NULL
AIC
Hi,
Entering data from a given file is the hardest part of learning R for me.
For example, I have this datafile from Moore's text:
LiveAge Count
Parents Age19 324
Another Age19 37
OwnPlaceAge19 116
Group Age19 58
Other Age19 5
Parents Age20 378
Another Age20 47
O
Thanks. Also helpful.
DAV
-Original Message-
From: William Dunlap [mailto:wdun...@tibco.com]
Sent: Wednesday, July 18, 2012 4:20 PM
To: David A Vavra; 'jim holtman'
Cc: r-help@r-project.org
Subject: RE: [R] Trapping option settings
Try using trace(), as in
trace(options, quote(print
> land<-c(0,0,0,0,1,1,1,0,0,0,1,1,0,0,0,0)
> expect <- c(1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3)
> cumsum(c(TRUE, diff(land)==1))
[1] 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3
> all.equal(.Last.value, expect)
[1] TRUE
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-
You have only saved the last run of the for() loop (when i is 4 and j is
7) to the object called model. If you want to save all of the lme fits,
you need to set give some dimensionality to the object model. For
example, you could define model as a list, then store the lme fits as
separate ele
1 - 100 of 125 matches
Mail list logo