On 03/09/2013 04:05 AM, Jing Lu wrote:
Hi everyone,
I hope this question is beyond read the manual. My task is simple, just
to plot the following, but the plot in the middle should be a
filled.contour plot:
http://gallery.r-enthusiasts.com/graph/Scatterplot_with_marginal_histograms_78
Hi all:
My data is in the attachment.
I want to analysis the mean difference of y between 2 sex.
My code:
result_lm-lm(y~factor(sex) + x1 + x2)
summary(result_lm)
The result of factor(sex)m 136.83, is the mean difference of y between 2
sex,and the corresponding p value is 0.07618.
My
On Sat, Mar 9, 2013 at 11:41 AM, Christofer Bogaso
bogaso.christo...@gmail.com wrote:
Hello again,
Let say I have an non-negative integer vector (which may be random):
Vec - c(0, 13, 10, 4)
And I have a date:
Date - as.Date(Sys.time())
Date
[1] 2013-03-09
Using these 2
On Sat, Mar 9, 2013 at 10:35 AM, meng laomen...@163.com wrote:
Hi all:
My data is in the attachment.
I want to analysis the mean difference of y between 2 sex.
My code:
result_lm-lm(y~factor(sex) + x1 + x2)
summary(result_lm)
The result of factor(sex)m 136.83, is the mean difference of y
Hello,
I don't believe there's such a function, but you can write one.
Date - as.Date(Sys.time())
New_Vec - c(2013-03-01, 2014-04-01, 2014-01-01, 2013-07-01)
New_Vec - as.Date(New_Vec)
Vec - c(0, 13, 10, 4)
plusmonths - function(x, y){
s - as.integer(format(x, %m)) + y
yx -
Hi,
You could try this:
library(lubridate)
res-as.Date(dmy(format(Date-8, %d-%m-%Y))+months(Vec))
res
#[1] 2013-03-01 2014-04-01 2014-01-01 2013-07-01
A.K.
- Original Message -
From: Christofer Bogaso bogaso.christo...@gmail.com
To: r-help r-help@r-project.org
Cc:
Sent: Saturday,
I have a data in the following form :
CIN TRN_TYP
90799541
90799542
90799543
90799544
90799545
90799544
90799545
90799546
90799547
90799548
90799549
90799549
..
..
..
there are 100 types of
Dear R-helpers,
I am stuck on a problem, and hope someone can help. I am trying to find the
time point in a time series where the values drop below a baseline threshold,
defined by the mean +/- standard deviation calculated on the last 6 time points
of the series. Here is a simplified example:
I **suggest** that you explain what you wish to accomplish using a
reproducible example rather than telling us what packages you think
you should use. I believe you are making things too complicated; e.g.
what do you mean by frequent patterns? Moreover, basket format is
rather unclear -- and may
On 09.03.2013 00:53, lefelit wrote:
Hi
I found the source of the problem. The R would not let me update the
survival and KernSmooth package at the R/library folder. I manually
delete them and then download the latest version of them to proceed with the
xcms installation. I work on a window 7
Hello,
I am using lmer (LME4) to build a model from data for 19 different
neighborhoods drawn, in part, from the American Communities Survey
(ACS). The ACS data is static while other variables change over the
five years under investigation. I am new to mixed effects models and
was hoping that
Katja,
this seems to be a bug.
I can reproduce this under 64-bit R-2.15.3 / R-prerelease for Windows.
It works with the results given by Ben Bolker under 32-bit R for Windows.
Will inspect shortly.
Best,
Uwe
On 07.03.2013 21:08, Katja Hebestreit wrote:
Hello,
optim hangs for some
Hello,
The following functions will return an index to the required values, not
the values themselves.
firstzero - function(x) which(x == 0)[1]
lastone - function(x){
z - firstzero(x)
if(z == 1) NULL else z - 1
}
Hope this helps,
Rui Barradas
Em 09-03-2013 12:53,
HI,
library(stringr)
dat1- read.table(text=
ID, Data
1,I love oranges and apples
2,Oranges are good so we must eat them and also drik oranges
3,Apples are not that good like oranges so eat oranges
,sep=,,header=TRUE,stringsAsFactors=FALSE)
#If you need to count both Oranges and oranges
Hello,
This is why the posting guide says that you sholud provide a data
example. Try the following.
dat - read.table(text =
ID, Data
1, I love oranges and apples
2,Oranges are good so we must eat them and also drik oranges
3,Apples are not that good like oranges so eat
On Mar 9, 2013, at 4:24 AM, Rui Barradas wrote:
Hello,
I don't believe there's such a function, but you can write one.
I beg to disagree. The seq.Date function lets one create sequences by month.
The only added twist in this case is to subract to the beginning of the current
month:
seq(
Hi Rui and Arun,
My apology, next time onwards I will post the data example as well. Things
are working and I appreciate your time.
Warm Regards
On Sat, Mar 9, 2013 at 10:02 PM, Rui Barradas ruipbarra...@sapo.pt wrote:
Hello,
This is why the posting guide says that you sholud provide a
Hi All,
This is very helpful, but my data looks like this
ID Data
1 I love oranges and apples
2Oranges are good so we must eat them and also drik oranges
3Apples are not that good like oranges so eat oranges
I would like to count # of oranges in each row. How do I go
Please do not massively cross-post and provide a reproducible example
(search stack overflow or other sites for advice on how to do so)
I _guarantee_ you R is not broken in this sense.
MW
On Sat, Mar 9, 2013 at 4:02 PM, Sujit Das reach.sujit...@gmail.com wrote:
Dear Sir / Madam,
I am using R
On Sat, Mar 9, 2013 at 5:11 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
Please do not massively cross-post and provide a reproducible example
(search stack overflow or other sites for advice on how to do so)
I _guarantee_ you R is not broken in this sense.
I would put money on
Trimmed cross posted addresses (and I apologize for not noticing this when I
was reviewing it in the moderation queue.)
PLEASE READ THE POSTING GUIDE. Sujit Das.
On Mar 9, 2013, at 8:02 AM, Sujit Das wrote:
Dear Sir / Madam,
I am using R Programming Language Version 2.15.1 (2012-06-22) for
On 09.03.2013 18:22, lefelit wrote:
Hi
It is unlikely not to have the required permissions as I was working on my
own pc as administrator.
Fine, so start R by right-click and Run as Administrator or so, and it
will work (unless the packages are already loaded before you start).
Uwe
HI Jakob,
If your data is based on 30 min interval, this should work:
dat1-read.table(text=
TIME, Value1, Value2
01.08.2011 02:30:00, 4.4, 4.7
01.09.2011 03:00:00, 4.2, 4.3
01.11.2011 01:00:00, 3.5, 4.3
01.12.2011 01:40:00, 3.4, 4.5
01.01.2012 02:00:00, 4.8, 5.3
01.02.2012 02:30:00, 4.9,
I understand that the two following loops should produce the exact same output.
However, they do not. It appears that looping directly through the sequence of
Date objects somehow makes them be coerced to numeric:
date1 = 20130301
date2 = 20130302
d1 = as.Date(date1, format=%Y%m%d, tz=GMT)
Hi
It is unlikely not to have the required permissions as I was working on my
own pc as administrator. The packages kernSmooth and survival are
loaded with the R software in the library folder. This is the sequence of
the installation process
source(http://bioconductor.org/biocLite.R;)
Warning
Instead of read the manual, how about read the answers that you have
already received. Or tell us why those answers are not good enough. Or
you can read the manual on the .filled.contour function (which is on the
same page as filled.contour).
On Fri, Mar 8, 2013 at 10:05 AM, Jing Lu
On Mar 9, 2013, at 9:24 AM, Alexandre Sieira wrote:
I understand that the two following loops should produce the exact same
output. However, they do not. It appears that looping directly through the
sequence of Date objects somehow makes them be coerced to numeric:
date1 = 20130301
On Sat, Mar 9, 2013 at 6:50 PM, David Winsemius dwinsem...@comcast.net wrote:
I was unable to find the reason for the original coercion in the help(for)
page or the R
Language Definition entry regarding for-loops. On the hunch that coercion via
as.vector
might be occurring,
Behaviorally,
On 2013-03-09 11:14, R. Michael Weylandt wrote:
On Sat, Mar 9, 2013 at 6:50 PM, David Winsemius dwinsem...@comcast.net wrote:
I was unable to find the reason for the original coercion in the help(for)
page or the R
Language Definition entry regarding for-loops. On the hunch that coercion via
Hi,
I wanted to change the order of how the plots appear in a multiplot
scenario. For example, in the code below:
#
pdf('test.pdf',width=8,height=8)
par(mfrow = c(2,2))
for(i in 1:2){
v1 - sample(1:1000,50)
v2 - sample(1:1000,50)
mat - cbind(v1,v2)
plot(v1,v2)
boxplot(mat)
}
I have found life to be considerably simpler since I have stopped using
Run-As-Administrator. If you use it at any point with R, various files
throughout your filesystem become accessible only when you use RAA again... it
is like heroin... use begets more use. If you restrict your use of admin
R's for loop is only designed to iterato over primitive types. The
help file says of the seq argument:
seq: An expression evaluating to a vector (including a list and an
expression) or to a pairlist or ‘NULL’. A factor value will
be coerced to a character vector.
[This
Hello,
Instead of mfrow use mfcol and the order becomes col by col.
Hope this helps,
Rui Barradas
Em 09-03-2013 20:55, Brian Smith escreveu:
Hi,
I wanted to change the order of how the plots appear in a multiplot
scenario. For example, in the code below:
#
Thanks Rui! That worked.
On Sat, Mar 9, 2013 at 4:22 PM, Rui Barradas ruipbarra...@sapo.pt wrote:
Hello,
Instead of mfrow use mfcol and the order becomes col by col.
Hope this helps,
Rui Barradas
Em 09-03-2013 20:55, Brian Smith escreveu:
Hi,
I wanted to change the order of how the
Dear all,
I'm using censReg 0.5-16 to run a random effects model in a panel data, but
R is having an error. I have already transformed my data using 'plm'. Can
someone help me understanding why?
This is the model and the error:
R tob1 - censReg(transfers.cap ~ ifdm + gdp.cap + coa.power +
I think the qdap package's termco (termo count) function will do what you want.
Read the specifics as spacing around the word matters.
library(qdap);
termco(DATA$state, 1:nrow(DATA), c(it))
Date: Fri, 8 Mar 2013 21:34:31 +0530
I see you provided sample data. Here it is with that:
library(qdap)
termco(dat$Data, dat$ID, c( oranges ))
From: tyler_rin...@hotmail.com
To: sudipanal...@gmail.com; r-help@r-project.org
Date: Sat, 9 Mar 2013 17:20:24 -0500
Subject: Re: [R] Word
On Mar 9, 2013, at 1:10 PM, luke-tier...@uiowa.edu wrote:
R's for loop is only designed to iterato over primitive types. The
help file says of the seq argument:
seq: An expression evaluating to a vector (including a list and an
expression) or to a pairlist or ‘NULL’. A factor
On Sat, 9 Mar 2013, Alexandre Sieira wrote:
Thanks for the clarification, Luke.
That is really counter-intuitive behavior. I 100% agree with you that the for
documentation should state that assumption explicitly.
I would also like to suggest changing the for implementation to issue a warning
Jie jimmycloud at gmail.com writes:
[snip]
I have a txt file to read into R. The size of it is about 500MB.
This txt file is produced by calling write.table(M, file =
xxx.txt), where M is a large matrix
After running MM = read.table(xxx.txt), the R gui keeps a cpu
core/thread fully
David Epstein davideps at umich.edu writes:
[snip]
I am using lmer (LME4) to build a model from data for 19 different
neighborhoods drawn, in part, from the American Communities Survey
(ACS). The ACS data is static while other variables change over the
five years under investigation. I am
Learned a new trick. thanks!
Zech
On Fri, Mar 8, 2013 at 6:41 PM, William Dunlap wdun...@tibco.com wrote:
Try using the combination
plot.new() ; par(new=TRUE)
to advance to the next position in the layout before querying par(pin).
Be sure to actually plot something after the
par(mfrow) and, apparently layout(), set things up for the next plot but
don't change
the settings for the current plot. Hence you need to start a new plot to look
at the settings
for it. If you don't call par(new=TRUE) then the subsequent call to plot()
(which calls the
equivalent of
Dear R People:
I have a data set with EEG data. There are 128 measurements per second for
16 locations. What is the best way to handle these series, please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
On Mar 9, 2013, at 7:36 PM, Erin Hodgess wrote:
Dear R People:
I have a data set with EEG data. There are 128 measurements per second for
16 locations. What is the best way to handle these series, please?
Have you done a search of Markmail with the term: EEG?
--
David Winsemius
HI,
Using
c11- 0.01
c12- 0.01
c1- 0.10
c2- 0.10
One possible problem is that:
dim(res5)
#[1] 513 20
res6-aggregate(.~m1+n1+m+n,data=res5[,c(1:6,9:12,21:24)] ,max)
#Error in `[.data.frame`(res5, , c(1:6, 9:12, 21:24)) :
# undefined columns selected
A.K.
(Sorry, failed to cc the list)
On Sat, Mar 9, 2013 at 10:11 PM, Bert Gunter bgun...@gene.com wrote:
Erin:
If this is a question about statistical methodology for such complex
data, then all I can say is: surely you jest! -- it's off topic and
farfetched, to say the least, to expect useful
I need to develop a simple list manipulation. Although it seems easier to
do it in matrix form, but I need it in list form.
I have a matrix
x - matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2)
for list form example, the conversion is
x.list - lapply(seq_len(nrow(x)), function(i) x[i,])
there is a typo.
lapply(x.list, calcnorm, x.list)
should be
lapply(x.list, calcnorm2, x.list)
sorry.
2013/3/10 ishi soichi soichi...@gmail.com
I need to develop a simple list manipulation. Although it seems easier to
do it in matrix form, but I need it in list form.
I have a matrix
Hi,
For the first case:
lst2-lapply(x.list, calcnorm2, x.list)
lapply(lst2,function(x) do.call(c,x))
#[[1]]
#[1] 0.0 31.75257
#[[2]]
#[1] 31.75257 0.0
A.K.
For the second case:
lst1-as.list(data.frame(t(apply(x,1,calcnorm2.const,x
names(lst1)- NULL
lst1
#[[1]]
#[1]
Thanks! You saved me a lot!
2013/3/10 arun smartpink...@yahoo.com
Hi,
For the first case:
lst2-lapply(x.list, calcnorm2, x.list)
lapply(lst2,function(x) do.call(c,x))
#[[1]]
#[1] 0.0 31.75257
#[[2]]
#[1] 31.75257 0.0
A.K.
For the second case:
But I don't want the original mean y ,but the corrected mean y of analysis of
covariant.
Also,the difference of original mean y is not 136.83,which is the difference of
the corrected meany.
ÔÚ 2013-03-09 20:11:11£¬R. Michael Weylandt michael.weyla...@gmail.com
дµÀ£º
On Sat, Mar 9,
Did you check out the 'colbycol' package.
On Fri, Mar 8, 2013 at 5:46 PM, Martin Morgan mtmor...@fhcrc.org wrote:
On 03/08/2013 06:01 AM, Jan van der Laan wrote:
You could use the fact that scan reads the data rowwise, and the fact that
arrays are stored columnwise:
# generate a small
Thanks for the clarification, Luke.
That is really counter-intuitive behavior. I 100% agree with you that the for
documentation should state that assumption explicitly.
I would also like to suggest changing the for implementation to issue a
warning if the seq argument is a vector of a
Hi .. i'm Carey.. trying to figure out how to get this vol surface
correct.. not sure where i'm going wrong..
http://pastebin.com/mmA4m4FJ
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Thanks for your reply.
But the mean y of sex(f) and sex(m) can't be negative since the min and max of
y is 1632.5 and 6410.6 respectively.
And your code's result:
sex(f): -1255.56
sex(m):-1118.73
The above result isn't correct since they are negative.
Thanks
At 2013-03-10
56 matches
Mail list logo