On Sun, 02 Jun 2013, Piyush Kumar kuma0...@gmail.com writes:
Hello
I am new to R and I have been trying to plot 2 different time series with 2
y axes. I have been able to plot it so far with 2 y axis but the x axis is
not shifted. I mean, the x range for data1 from day1 and xrange for data2
On 03.06.2013 07:19, Pascal Oettli wrote:
Hi,
How did you upgraded your version of R? From source or from a Linux
package?
Actually the new R installation is just broken. It simply has to be
reinstalled carefully (watch for errors).
Best,
Uwe Ligges
Regards,
Pascal
On
My mistake,
Regards,
Pascal
On 06/03/2013 04:37 PM, Uwe Ligges wrote:
On 03.06.2013 07:19, Pascal Oettli wrote:
Hi,
How did you upgraded your version of R? From source or from a Linux
package?
Actually the new R installation is just broken. It simply has to be
reinstalled carefully
Hi All,
Sorry about this quite basic, but I am very new to R.
I have a data file which has a dependent variable (reaction time) and a couple
of independent variables, one of which is coded 1-8; I want to calculate the
reaction time for each of the 8 codes of the independent variable.
Thanks
Hi Laura,
I think you're looking for aggregate()
See ?aggregate
If you had posted a reproducible example, I could have given you a more
detailed answer. Learn to use the dput() function to do so.
If you're very new to R, maybe this could help you get started:
Hello,
Like Ivan said, you should give us a data example, the best way is to do
it is to paste the output of ?dput in a post. If your data frame is
named 'dat' use the following.
dput(head(dat, 50)) # paste the output of this in a post
As for the question, here is an example using
HI,You could also try:
set.seed(24)
dat1-
data.frame(Reaction_time=sample(24:60,80,replace=TRUE),Categ=rep(1:8,each=10))
with(dat1,tapply(Reaction_time,list(Categ),FUN=mean))
# 1 2 3 4 5 6 7 8
#43.7 39.8 37.5 42.7 33.9 42.3 43.2 40.0
#or
library(plyr)
Hi,
Thanks all for the help. I have used the dput function which I have posted
below. What I am trying to do is calculate the mean latency for each
state(1-8), in each condition (1-10), for each participant (n=13). I know for
this to be most efficient I would need some form of loop, but this
Hi,
May be this is what you wanted:
dat2: dataset
library(plyr)
res1-ddply(dat2,.(subject,conditionNo,state),summarize,MLat=mean(latency))
res1
#subject conditionNo state MLat
#1 1 1 1 674.8947
#2 1 1 2 649.5000
#3 1 1 3
I've had something similar and have had better luck using the PrimoPDF
software to Print a PowerPoint to a PDF device instead of saving from
PowerPoint to PDF.
Best,
Kevin
On Sun, Jun 2, 2013 at 12:15 PM, Erling Johan Frøysa
erling.fro...@gmail.com wrote:
Hello,
I am using R to create
I have not seen this particular problem, but I have seen other problems and I
tend to export bitmaps or pdf files as a result.
Note that a reproducible example is usually required to to obtain help on this
list, and posting in HTML format is bad because it mutilates example code, so
fix your
You need to be more explicit about what you are doing.
For this problem:
y = (x1 + x2)/2
where x1 and x2 are chi-square random variables, you want to use the pchisqsum() routine
found in the survey package. This is not a trivial computation.
For the alternate problem where y is a random
Thanks Ben,
I did just that after getting Duncan's reply. I should have seen it myself but
for some reason thought I could treat it as an option. Myopia at its best.
John Kane
Kingston ON Canada
-Original Message-
From: bbol...@gmail.com
Sent: Sun, 2 Jun 2013 20:57:58 +
To:
Hello Dear R-help Members,
I have noticed that when pasting text with tab in it to the R console it
eliminates the tab. Whereas, when pasted into the R Editor, the tab is
preserved.
For example, pasting this:
1997 7680
In the R Console will result in:
19977680
Is there a way to preserve the tab?
Pasting tabs into the console works for me on linux, which suggests
that you need to provide more information about your OS and all the
other usual things.
Sarah
On Mon, Jun 3, 2013 at 9:15 AM, Tal Galili tal.gal...@gmail.com wrote:
Hello Dear R-help Members,
I have noticed that when pasting
My apologies Sarah, you are right, here:
sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255
LC_MONETARY=Hebrew_Israel.1255
[4] LC_NUMERIC=C LC_TIME=Hebrew_Israel.1255
Hi again Laura,
Let's say your data.frame is called df, just run this:
aggregate(latency~subject+conditionNo+state, data=df, FUN=mean)
I think this is what you're looking for.
For help, check ?aggregate and ?formula.
HTH,
Ivan
--
Ivan CALANDRA
Université de Bourgogne
UMR CNRS/uB 6282
Hello,
Try
aggregate(latency ~ state + conditionNo + subject, data = dat, FUN = mean)
Rui Barradas
Em 03-06-2013 12:29, Laura Thomas escreveu:
Hi,
Thanks all for the help. I have used the dput function which I have posted
below. What I am trying to do is calculate the mean latency for
On Mon, Jun 3, 2013 at 9:24 AM, Tal Galili tal.gal...@gmail.com wrote:
My apologies Sarah, you are right, here:
sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255
Dear all,
I would like to split the data based on the place and then would like to
see how many names were common in place with corresponding value .
Please find a demo file.
Thanks for your expert comment
best
Nico
dput(dta)
structure(list(place = structure(c(3L, 2L, 5L, 6L, 4L, 3L, 2L,
On Jun 3, 2013, at 15:22 , Sarah Goslee wrote:
Pasting tabs into the console works for me on linux, which suggests
that you need to provide more information about your OS and all the
other usual things.
Which console and which Linux?
Anyways, the thing that usually gets in the way is
Probably because you have defined all of the variables as
supplemental. These will then be estimated from the other variables,
but there are no other variables.
---
David L Carlson
Associate Professor of Anthropology
Texas AM University
College Station, TX
I have come across this issue many times. I have yet to find a pattern in what
causes this.
At least I can offer a workaround. Instead of using Save As to create the
pdf, what I do is Print with Adobe PDF as the printer. This gets rid of
those lines and the resulting pdf looks just as nice.
On 03/06/2013 14:48, peter dalgaard wrote:
On Jun 3, 2013, at 15:22 , Sarah Goslee wrote:
Pasting tabs into the console works for me on linux, which suggests
that you need to provide more information about your OS and all the
other usual things.
Which console and which Linux?
Anyways, the
In addition to the manner in which the PDF files are generated, you might want
to consider the possibility that the lines are artifacts created by your PDF
viewer.
See:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-there-unwanted-borders
Regards,
Marc Schwartz
On Jun 3, 2013, at
Nikky,
It is helpful if you provide a simplified version of your question with
data. For example:
# simplified example
y - c(2.2, 2.4, 2.35, 2.45)
upper - 0.17
lower - upper
# current plot, with default base of 0
b - barplot(y, ylim=c(2, 3))
arrows(b, y+upper, b, y-lower, angle=90, code=3)
Nico,
It is unclear to me what sort of result you are looking for.
Can you give an example of what the output would look like using the
example data you provided?
You can look at the occurrence of names and places using the table()
function,
table(a$name, a$place)
or you could look at the
Hi,
It is not clear.
dta1-do.call(data.frame,dta)
dta2-dta1[complete.cases(dta1),]
dta2[,-3]-lapply(dta2[,-3],as.character)
lstdta2-split(dta2,dta2$place)
library(plyr)
join_all(lapply(lstdta2,`[`,-1),by=name,type=inner) #none of them are common
#[1] name value value value value value
#0 rows
It may be easier if you convert the list you provided to a
data.frame:
dta.df - data.frame(place=dta$place, name=dta$name,
value=dta$value)
dta.df
Note that the last line is blank so you probably want to remove that
and remove the blank factor levels:
dta.df - dta.df[-nrow(dta.df),]
Hi All, whenever I open R using the shortcut on desktop, there are 2 active
datasets in the workspace, I tried to start the program from Start menu,
same thing!! How can I delete these two active datasets and make sure
whenever I restart the program, they wont appear?
Thanks!
It sounds like you inadvertently saved a workspace file. Have a look in your
current directory and see if there is an .RDATA file there that you don't
recognize. If so, delete it.
John Kane
Kingston ON Canada
-Original Message-
From: ye...@lbl.gov
Sent: Mon, 3 Jun 2013 08:25:59
Hello.
Does anyone know what the error code NEW_X means in optim? Here is what the
return looks like:
$counts
function gradient
302 302
$convergence
[1] 1
$message
[1]
On 02/06/2013 1:15 PM, Erling Johan Frøysa wrote:
Hello,
I am using R to create graphics, especially to plot time series charts.
These charts are then copied as metafiles (for best quality) to a PowerPoint
presentation and then saved to PDF (via the Save As dialog).
Attached is two pictures.
Your email Is missing a reproducible example... very sub-optimal, likely to be
ignored.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.
Hello, Jeff.
Thank you for your quick response. Unfortunately, a reproducible example will
be difficult, if not impossible, as it depends on a particular compilation of
both 'R' and 'Rblas.dll' as described in
https://stat.ethz.ch/pipermail/r-devel/2013-May/066731.html. I therefore was
hoping
Thank you for the three (!) solutions suggested. I found that the base
subtraction trick worked well, but I investigated all three:
offset, I found, referred to moving bars on the x-axis. Great for line plot
jitter when they're overlapping, but not the problem I was trying to solve
here. Sorry
Hi guys,
I am working now for several years in R and I would say I manage things pretty
easily, but with the foreach loop I have my problems. I call for a simulation a
double foreach loop and this works fine. Inside the second loop (which I plan
to parallelize later on) I call Rs
I believe you are looking for the offset= parameter. Consider the
following:
barplot(c(2, 3), ylim=c(1, 3))
barplot(c(2, 3), ylim=c(1, 3), offset=1)
-
David L Carlson
Associate Professor of Anthropology
Texas AM University
College Station, TX 77840-4352
Janh,
Janh Anni skrev 2013-06-01 19:47:
Hello All,
Thanks a lot for the helpful suggestions. I wonder how ties are handled
for the rank sum test by wilcox_test and wilcox.exact? For instance,
Ties handling was mainly a problem back in the day when recursion
formulas were used for the
Christos Giannoulis cgiannoul at gmail.com writes:
Dear All,
I was looking the r-archives and crantastic...for a package that has a
robust approach to generalized additive models. I found two packages
robustgam and rgam but their implemented functions
cover only binomial and poisson
Hi,
I'm trying to build a mixed-effects model in which I'd like to include
either a distance matrix or a phylogenetic tree as a random effect.
The troubles I've had are that:
1. Function lmer() in package lme4 only accepts a data frame column as a
random factor and not a distance matrix.
2.
Recommendation: Post this to the R-sig-mixed-models list, not here.
Cheers,
Bert
On Mon, Jun 3, 2013 at 9:27 AM, Roey Angel an...@mpi-marburg.mpg.de wrote:
Hi,
I'm trying to build a mixed-effects model in which I'd like to include
either a distance matrix or a phylogenetic tree as a random
Dear all,
I am fitting a parametric regression model to survival data using the
flexsurvreg function from the flexsurv package. I am using a Gompertz
distribution (a 2-parameter distribution) to describe the hazard function
and I want to compare two groups. The model is very simple:
Hello R community members,
I'm trying to install the 'rqpd' package which is developed by Roger
Koenker and Stefan Bache. When I try to install the package using the
command 'install.packages(rqpd,repos=http://R-Forge.R-project.org;)'
I'm getting the following two messages:
i) package
As I understand it, there are multiple competing standards for the Windows
Metafile (WMF) format. See
-- http://en.wikipedia.org/wiki/Windows_Metafile
I like WMF because it is vector based and thus scales nicely. But eventually
I gave up on it because the WMF format was unpredictable when
Very interesting, thank you.
However, after disabling the tab completion, the RGUI still can't
distinguish pasted tabs. e.g:
# Running:
Sys.setenv(R_COMPLETION=FALSE)
Sys.getenv(R_COMPLETION)
a = read.table( text=
1 2
3 4
)
a
# will result in: (instead of two columns)
V1
1 12
2 34
Bert Gunter gunter.berton at gene.com writes:
Recommendation: Post this to the R-sig-mixed-models list, not here.
Cheers,
Bert
Seconded. Alternatively you could try the r-sig-ph...@r-project.org
mailing list, although I think I would try R-s-m-m first.
On Mon, Jun 3, 2013 at 9:27
On Jun 3, 2013, at 12:46 PM, Tal Galili wrote:
Very interesting, thank you.
However, after disabling the tab completion, the RGUI still can't
distinguish pasted tabs. e.g:
# Running:
Sys.setenv(R_COMPLETION=FALSE)
Sys.getenv(R_COMPLETION)
a = read.table( text=
1 2
3 4
)
a
On Mon, Jun 3, 2013 at 11:37 AM, Simon Zehnder szehn...@uni-bonn.de
... [Some not minimal, self contained, reproducible code]...
Data simulation and thecreation of startpar works fine, but the parameters
in res$par are always the start parameters. If I run the same commands
directly on the
On 02.06.2013 17:57, Matthew Fagan wrote:
Thank you Dr. Ligges, i very much appreciate the quick reply. i
wondered if that was the case, based on the math as I (poorly)
understood it. However i remain confused. page 107 from the rrcov
package PDF makes me think I can derive LDA-style
dear R wizards---
I presume this is a common problem, so I thought I would ask whether
this solution already exists and if not, suggest it. say, a user has
a data set of x GB, where x is very big---say, greater than RAM.
fortunately, data often come sequentially in groups, and there is a
need to
This may not help if the OP is using Mac or Windows since these hidden by
default. Seek out OS info on how to show dot-files.
--
David
Sent from my iPhone
On Jun 3, 2013, at 8:33 AM, John Kane jrkrid...@inbox.com wrote:
It sounds like you inadvertently saved a workspace file. Have a look
Hello Henric,
Thank you so much for the detailed responses and helpful information. Much
appreciated.
Regards
Janh
On Mon, Jun 3, 2013 at 6:15 AM, Henric Winell nilsson.hen...@gmail.comwrote:
Janh,
Janh Anni skrev 2013-06-01 19:47:
Hello All,
Thanks a lot for the helpful suggestions.
Hi,
May be this helps:
res1-df1[with(df1,unlist(tapply(var,list(subid),FUN=function(x)
c(FALSE,diff(x)!=0)),use.names=FALSE)),]
res1
# subid year var
#3 36 2003 3
#7 47 2001 3
#9 47 2005 1
#10 47 2007 3
#or
library(plyr)
On Jun 3, 2013, at 7:10 PM, arun wrote:
Hi,
May be this helps:
res1-df1[with(df1,unlist(tapply(var,list(subid),FUN=function(x)
c(FALSE,diff(x)!=0)),use.names=FALSE)),]
res1
# subid year var
#3 36 2003 3
#7 47 2001 3
#9 47 2005 1
#1047 2007 3
#or
Yes,I DO select all of the variables as quanti.sup and quali.sup.
From your words,it seems that the quanti.sup and quali.sup. are not parts of
the original variables,but are estimated from the other variables?
Many thanks.
At 2013-06-03 21:54:59,David Carlson dcarl...@tamu.edu wrote:
Hi--
I am trying to normalize course grades for each instance of a course, e.g.
Stats 1 Fall2009 J. Smith.
I have a frame for all instances of a course, e.g. stats 1 in the last 5
years, that looks like
SIDN TERM GRADE INST
where SIDN is a Student ID Number, TERM is a factor that gives the
If it is grouped by subid (that would be the difference in the number of
changes)
subset(ddply(df1,.(subid),mutate,delta=c(FALSE,var[-1]!=var[-length(var)])),delta)[,-4]
# subid year var
#3 36 2003 3
#7 47 2001 3
#9 47 2005 1
#10 47 2007 3
A.K.
- Original Message
58 matches
Mail list logo