hello:
Do any one know how to set sweave option by variable, for example I want
set some of my selected code chunk with:
<>= rather than <>=, so I can change the action
only in the head by change the variable "needRun" one times.
I have tried use "\Def" and "\newcommand", both do not work, so I
Hi,
try this;
sum(sapply(a, function(x) (x==b)))
--
View this message in context:
http://r.789695.n4.nabble.com/Re-Counting-elements-in-columns-tp3454930p3454936.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mai
Dear All
I will be glade if you help me to understand what difference is between
"trend Stationary" and "level Stationary" at kpss.test in tseries package.
best regards
stat consult
--
[[alternative HTML version deleted]]
__
R-help@r-project.or
Branimir K. Hackenberger wrote:
>
> This is some interesting:
>
>> -8^(1/3)
>
> [1] -2
>
>> x=(-8:8)
>
>> y=x^(1/3)
>
>> y
>
> [1] NaN NaN NaN NaN NaN NaN NaN
> NaN
> 0.00 1.00
>
> [11] 1.259921 1.442250 1.587401 1.709976 1.817121 1.912931 2
?Syntax for precedence of operators.
On 16/04/11 22.51, Branimir K. Hackenberger wrote:
This is some interesting:
-8^(1/3)
[1] -2
x=(-8:8)
y=x^(1/3)
y
[1] NaN NaN NaN NaN NaN NaN NaN NaN
0.00 1.00
[11] 1.259921 1.442250 1.587401
This is some interesting:
> -8^(1/3)
[1] -2
> x=(-8:8)
> y=x^(1/3)
> y
[1] NaN NaN NaN NaN NaN NaN NaN NaN
0.00 1.00
[11] 1.259921 1.442250 1.587401 1.709976 1.817121 1.912931 2.00
So, can anybody explain this?! (Why is x[1]^(1/3)=y
length(intersect(a, b))
On Sat, Apr 16, 2011 at 8:04 PM, Jim Silverton wrote:
> I have two columns and I want to count hwo many pairs I have of the same
> element. For example. If I have
> a = c(1,2,3,4,5)
> b= c(12, 1, 34, 2, 5, 0, 10, 100, 11)
> It should return 3 (since 1, 2 and 5 occur in bo
Hi:
library(sos) # install first if you don't already have it
findFn('reversible jump')
It appears that a good starting point might be the RJaCGH package,
which is concerned with reversible jump MCMC in CGH arrays. Other
possiblilities may be found in the bim, evdbayes and ape packages.
HT
I have two columns and I want to count hwo many pairs I have of the same
element. For example. If I have
a = c(1,2,3,4,5)
b= c(12, 1, 34, 2, 5, 0, 10, 100, 11)
It should return 3 (since 1, 2 and 5 occur in both columns).
Columns need not be of the same length.
--
Thanks,
Jim.
[[alternati
This will add the regression line to it:
> x <- read.table(textConnection("id invest payout
+ 1 10 -1
+ 1 33 33
+ 1 20 -5
+ 2 200 33
+ 2 33-20
+ 3 5 -5
+
Here is a start. This should create the plot:
> x <- read.table(textConnection("id invest payout
+ 1 10 -1
+ 1 33 33
+ 1 20 -5
+ 2 200 33
+ 2 33-20
+ 3 5
I would first recommend upgrading to the latest version of R. I am
running R 2.12.2 on Windows 7 and it seem to run fine:
> DT = data.table(x=rep(c("a","b","c"),each=3), y=c(1,3,6), v=1:9)
> setkey(DT,x)
> DT["a"]
x y v
[1,] a 1 1
[2,] a 3 2
[3,] a 6 3
On Sat, Apr 16, 2011 at 3:30 PM, yod
Dear R users,
I´m studying about Bayesian Statistics. In this context, please, anyone have
some basic script of RJMCMC (Reversible Jump Markov chain Monte Carlo) in R
or WinBUGS?
My aim is to learn how to implement this methodology.
Thanks a lot.
Marcus Vinicius
[[alternative HTML version
On 04/16/2011 11:04 PM, Josh B wrote:
Dear listserv,
Here is my latest formatting problem. I would like to rotate the x-axis labels
by 45 degrees on a _barplot_. Apparently this is slightly different from the
example given in the R FAQ, which is for rotating the x-axis labels on a
scatterplot
(h
Thanks for the answers. They were very helpful. I did it like below.
data$z <- ifelse(data$x == "A" & data$y == "A", "NA", "B").
That is enough for today. I guess I learned a enough today. Thanks to
everbody who tried to help.
--
View this message in context:
http://r.789695.n4.nabble.com/i
Hi ozgrerg,
I am not a "good" R user, but according to me you can do this;
data <- data.frame(x=c("A","A","B","A"), y=c("A","B","B","B"))
for (i in 1:nrow(data)){
if(data$x[i]=="B"||data$y[i]=="B") z[i]=c("B")
else
z[i]=c("NA")
}
cbind(data,z)
--
View this message in context:
http://r.789695.n
Sorry, sorry for taking your time. I solved the problem.
data=transform(data,C= A+B)
It is so simple. But if you dont know it is hard. Again sory for taking time
--
View this message in context:
http://r.789695.n4.nabble.com/adding-two-colmns-of-a-data-frame-tp3454556p3454572.html
Sent from t
Hi there,
I have a data frame DF of over 600 people's short term trade data in time
order. Below is the simplified structure of the data.
id invest payout
[1] 1 10 -1
[2] 1 33 33
[3] 1 20 -5
[4] 2 200
It seems very simple but I could not find the way. I just want to add two
columns of a data frame. I am doing the below operation:
data$C=transform(data, data$A+data$B)
However that return as a data frame. I will be glad if ypu help. Thanks a
lot
--
View this message in context:
http://r.
Dear R users,
I am quite new to R, so most of the problems I've encountered working with
it are technical, absurd or simple things. Sorry.
Despite this, I am struggling with cajolst function for a day and still
nothing. The problem is that I can't get an estimate for the break point
(which is in t
Hi there,
I have a data frame DF of over 600 people's short term trade data in time
order. Below is the super simplified structure of the data.
id invest payout
[1] 1 10 -1
[2] 1 33 33
[3] 1 20 -5
[4] 2
Dear R experts, I have again a problem. Let I have a data frame like below:
x y
--
A A
A B
B B
A B
where x and y are the column names. I want to create a new column z where it
is elements
will be like that, if at each row has there at least one 'B', then z wi
R.2.11.1 on Windows 7
When running data.table examples.
> DT = data.table(x=rep(c("a","b","c"),each=3), y=c(1,3,6), v=1:9)
> setkey(DT,x)
> DT["a"]
I get the following error message
Erreur dans seq.default(to = xlen, length = n) :
length must be non-negative number
When running the test.data.ta
Dear all, when we have to do an exploration of our data with SEM
So this is a lot of possibilitiesâ there isnât programms done in order
to test theses models
Antra EL MOUSSELLY
Date: Tue, 5 Apr 2011 09:49:08 -0500
From: ml-node+3428265-1156197921-225...@n4.nabble.com
To: antr.
On 17/04/11 10:01, sam.e wrote:
Hi there,
I have been using the Tps function (within the Fields package) for a while
now to interpolate different sedimentary units. Due to the method of
formation of the units I know that at some edges the thickness of the unit
decreases to zero. I was wondering
On 17/04/11 02:17, Gregory Ryslik wrote:
Hi Mr. Turner,
You are correct that I am confused a bit by the RCode. Basically, I have 3772
observations of data and only about 500
500? You said 944 previously. Doesn't really matter, but.
of them correspond to where "people" exist. For the ot
On 17/04/11 02:17, Gregory Ryslik wrote:
Hi Mr. Turner,
You are correct that I am confused a bit by the RCode. Basically, I have 3772
observations of data and only about 500
500? You said 944 previously. Doesn't really matter, but.
of them correspond to where "people" exist. For the ot
Hi there,
I have been using the Tps function (within the Fields package) for a while
now to interpolate different sedimentary units. Due to the method of
formation of the units I know that at some edges the thickness of the unit
decreases to zero. I was wondering if there was someway to specify t
Hi Rolf,
Thanks for the feedback, I am indeed using the 'spatstat' package and now
have the info I need.
Thanks again,
Sam
--
View this message in context:
http://r.789695.n4.nabble.com/Idetntifying-nearest-topographic-contours-to-data-points-tp3452462p3454680.html
Sent from the R help mailing l
Thanks you for help
2011/4/13 Peter Alspach
> Tena koe Fabiane
>
> ?par
>
> In particular, various cex. parameters. These can be used with plot (e.g.,
> plot(x, y, cex.axis=1.2))
>
> HTH
>
> Peter Alspach
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-hel
On Sat, Apr 16, 2011 at 6:39 PM, Al Roark wrote:
>
> Hi All:
> I have some basic questions about Cairo graphics engine. I'm trying to use
> the Cairo package to produce PDF output, mainly because I perceive it to be
> easy to use with a wide variety of fonts.
>
You may also want to try cairo_pdf
Out of curiosity, do you have a problem calling `library(ggplot2)`
from the R prompt (after R is finished "spinning up")?
I vaguely recall (~ 2 years ago) that I was trying to load some
packages in my ~/.Rprofile since I thought I always wanted them in R
anyway and had problems ... I've given up t
On 11-04-16 1:38 PM, Tyler Rinker wrote:
Problem:
I updated from r.2.12 to r.2.13 and when I use library(car) for example it says:
library(car)
Error in library(car) : there is no package called 'car'
So I found that the packages I had before are located in:
C:\Users\Documents\R\win-library
I have just upgraded to R 2.13 and have library(ggplot2) in my
.Rprofile (among other things). when i start R I get an error
message. Has something in the start up scripts changed? Is there a
better way to specify the library calls in .Rprofile? Thanks for all
of the help in advance.
Error:
L
Hi,
I think you can search in the parent environments by "brutal force"
like this (I don't guarantee it works for all Sweave documents):
if ((n.parents <- length(sys.parents())) >= 3) {
for (i in seq_len(n.parents) - 1) {
if ('chunkopts' %in% ls(envir = sys.frame(i))) {
Problem:
I updated from r.2.12 to r.2.13 and when I use library(car) for example it says:
> library(car)
Error in library(car) : there is no package called 'car'
So I found that the packages I had before are located in:
C:\Users\Documents\R\win-library\2.12
Now they're in:
C:\Users\Documen
On Apr 16, 2011, at 11:50 AM, Peter Ehlers wrote:
> On 2011-04-16 09:36, Sascha Vieweg wrote:
>> On 11-04-16 15:04, Josh B wrote:
>>
>>> Dear listserv,
>>>
>>> Here is my latest formatting problem. I would like to rotate the x-axis
>>> labels
>>> by 45 degrees on a _barplot_. Apparently this i
On 2011-04-16 09:36, Sascha Vieweg wrote:
On 11-04-16 15:04, Josh B wrote:
Dear listserv,
Here is my latest formatting problem. I would like to rotate the x-axis labels
by 45 degrees on a _barplot_. Apparently this is slightly different from the
example given in the R FAQ, which is for rotatin
Hi All:
I have some basic questions about Cairo graphics engine. I'm trying to use the
Cairo package to produce PDF output, mainly because I perceive it to be easy to
use with a wide variety of fonts.
But right now, I'm stuck trying to figure out what fonts are available to be
used with Cairo,
On 11-04-16 15:04, Josh B wrote:
Dear listserv,
Here is my latest formatting problem. I would like to rotate the x-axis labels
by 45 degrees on a _barplot_. Apparently this is slightly different from the
example given in the R FAQ, which is for rotating the x-axis labels on a
scatterplot
(http:
Dear R-users, -developers and -maintainers,
The situation is the following. My colleagues and me need to use the CGDSR-
package (http://www.cbioportal.org/cgx/cgds_r.jsp) on a Ubuntu 10.04 64bit
workstation behind a HTTP proxy at campus. We
are using R 2.12.2 (2011-02-25) retrieved via the Ubunt
I'd like to provide a simple user capability of choosing some parameters that
I could grab to generate a graph. User would be selecting choices via radio
buttons etc via a web browser. I work in a Windows environment. Does anyone
have sample code?
--
View this message in context:
http://r.789695.
All that link is doing is taking me to a Windows Live log-in screen.
An alternative posting site might be
[url=http://www.mediafire.com/][b]Mediafire[/b][/url .
--- On Sat, 4/16/11, wangxipei wrote:
> From: wangxipei
> Subject: [R] how to get the plot like this by R?
> To: "r-help"
> Recei
Hi Peter and R community;
Thank you Peter for suggestion. I tried the following:
genetic_evaluation<-transform(genetic_evaluation,
sire=factor(sire),dam=factor(dam))
require(lme4); mod <- lmer(adg ~ 1 + (1|sire) + (1|dam:sire),
data=genetic_evaluation)
ranef (mod)
provides random effects asso
On Fri, 15 Apr 2011, Uwe Ligges wrote:
On 14.04.2011 18:14, rbali wrote:
Same problem with Vista
1. Please quote the original message, mailing list readers are not able to
follow otherwise!
2. Peter Dalgaard wrote that it is a bug in the ctv package, so everything is
said already. And rathe
Dear listserv,
Here is my latest formatting problem. I would like to rotate the x-axis labels
by 45 degrees on a _barplot_. Apparently this is slightly different from the
example given in the R FAQ, which is for rotating the x-axis labels on a
scatterplot
(http://cran.r-project.org/doc/FAQ/R-F
Hi, Ravi,
Thank you, but I did not get it!
I tried hard by specifying the vector of probabilities, but it always gives
zeros and all integers as eigenvalues.
The eigenvalues need to be not just integers and they should satisfy order
requirement.
Any more suggestions?
Regards,
-Chee
From: Ravi
bellewong wrote:
>
> The figure is posted at
>
> http://www.mediafire.com/i/?08b9f4um43vxvw8
>
>
That type of plot that has descended on us like a beeswarm. Try the package
with that name.
Dieter
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-get-the-plot-like-this
Dear Ben,
I would like to thank you for your answer.
Unfortunately is not very clear how simplify works and what is the difference
between TRUE and FALSE ( I am not at work right now to check the difference)
Regards
Alex
--- On Sat, 4/16/11, Ben Bolker wrote:
> From: Ben Bolker
> Subject: Re
Alaios yahoo.com> writes:
>
> Dear all
> I would like to have in R a big struct containing a smaller struct.
>
> 1) I would like to have a small struct with the following three fields
> xorder (an integer ranging from 0 to 20)
> yorder (an integer ranging from 0 to 20)
> estimated (a 256*256
Hello R-Community,
I have the following matching problem: I have two data.frames, one
with an observation every month (per company ID), and one with an
observation every quarter (per company ID; note that quarter means
fiscal quarter; therefore 1Q = Jan, Feb, Mar is not necessarily
correct and als
Hi Mr. Turner,
You are correct that I am confused a bit by the RCode. Basically, I have 3772
observations of data and only about 500 of them correspond to where "people"
exist. For the other observations, I just have the covariate values so I
thought that this was appropriate. Thus, where "pe
On Fri, Apr 15, 2011 at 8:45 AM, Ben Bolker wrote:
> Kevin Wright gmail.com> writes:
>
>>
>> > I am trying to teach myself R and replicate some previous SAS analysis.
>> > Could someone please help me translate the following SAS code into R.
>> >
>> > Proc mixed method=ml
>> > Class Group Treatme
The link is working fine now.
Have a look at
http://www.r-statistics.com/2011/03/beeswarm-boxplot-and-plotting-it-with-r/
. I think Jim Lemon's code does what you want.Â
--- On Sat, 4/16/11, wangxipei wrote:
From: wangxipei
Subject: Re:Re: [R] how to get the plot like this by R?
To: "J
I am sorry for the fault. The figure is posted
athttp://www.mediafire.com/i/?08b9f4um43vxvw8 (hope this works!).
Thank John for the website.
Xipei Wang, Ph.D. student
--
Xipei Wang, Ph.D. student
Department of Pharmaceutics, School of Pharmaceutical Sciences,
Peking University Health Scienc
On 04/16/2011 06:30 AM, Daryl Morris wrote:
Hi,
Is there a function somewhere that does a "patterned" jitter of data?
I've googled and the problem is that I don't know what to google for.
The setting is in grouped data. I have plots which overlay jittered
points on a boxplot. I simply jitter th
Thank you!
Your code worked!
I tested all the combinations and this shows that, in addition to the
'rattle', in this launcher code the 'utils' package is required, otherwise
'rattle' do not launch. Without all other packages 'rattle' starts very
well. But what will be better, the inclusion or not
Dear R users,
I see a graph (shown
athttps://cid-c486ebef16722625.photos.live.com/self.aspx/%e6%88%91%e5%96%9c%e6%ac%a2%e7%9a%84%e8%8a%b1/untitled.bmp)
in a published paper, which is very informative and clear. But I don't know
what type the graph is.
It looks like a sactter plot but
I would like to print the label of each code chunk, just before printing the
code chunk itself. Is that possible using SweaveHooks, or by some other
mechanism?
Thanks
David
--
View this message in context:
http://r.789695.n4.nabble.com/Sweave-SweaveHooks-and-printing-the-label-tp3453829p3453829.
Dear all
I would like to have in R a big struct containing a smaller struct.
I have tried something that I would like to share and ask your help make it work
1) I would like to have a small struct with the following three fields
xorder (an integer ranging from 0 to 20)
yorder (an integer rangi
On 2011-04-15 16:42, Bill Hyman wrote:
Hi friends,
Does anyone know how to make truncated y axis with cut mark (\\) in R plot? Many
thanks!
See axis.break() in the plotrix pkg.
Peter Ehlers
Bill
__
R-help@r-project.org mailing list
https://stat.
On Apr 16, 2011, at 09:52 , Dieter Menne wrote:
>>
>
> Thanks for providing a self-contained example. The error message is really a
> bit confusing (anybody around who understands what lme thinks here?),
It's not thinking at all, it's just evaluating a:b (so usual model formula
interpretatio
On 16/04/11 15:50, Gregory Ryslik wrote:
Hi Everyone,
I am trying to figure out the spatstat package for the first time and am having
some trouble. Unfortunately, I can't post my data set but I'll hopefully post
enough details for some help.
I want to model the intensity of a spatial point pr
Hi,
I have two unequal patient groups belonging to different
geographic locations, treated by different drug regimens and their
survival data. N1=150 and N2=60
In each group of data there are
three strata for one independent variable- treatment status (2=two
drugs administered, 1=only one conv
dorien wrote:
>
>> fit <- lm((tos~nh1*nh2*nh3*randsize*aweights*tt1*tt2*tt3*iters*length,
> data=expdata))
> Error: unexpected ',' in "fit <-
> lm((tos~nh1*nh2*nh3*randsize*aweights*tt1*tt2*tt3*iters*length,"
>
>
Peter's point is the important one: too many interactions, and even with +
instea
helin_susam wrote:
>
> x <- rnorm(100)
> y <- rlnorm(100)
> model <- lm(y~x)
> a <- resid(model)
>
> How I show the all area under the normal curve?
>
>
First, always try plot(model). It can never hurt. Too bad the plot you want
is not among the six contenders (?plot.lm).
To do it manually:
Nilaya Sharma wrote:
>
> I was trying to fit a mixed model in animal experiment but stuck at simple
> point. The following similar example is from SAS mixed model pp 212.
>
>
> genetic_evaluation <- read.table(textConnection("
> sire dam adg
> 1 1 2.24
> 1 1 1.85
> ...
> 5 2 2.58
> 5 2
On Apr 16, 2011, at 04:21 , Nilaya Sharma wrote:
> genetic_evaluation <- read.table(textConnection("
> sire dam adg
> 1 1 2.24
> 1 1 1.85
> 1 2 2.05
> 1 2 2.41
> 4 2 1.86
> 4 2 1.79
> 5 1 2.82
> 5 1 2.64
> 5 2 2.58
> 5 2 2.56"), header = TRUE)
>
> # my R practice codes
>
On 2011-04-15 14:36, Dorien Herremans wrote:
Hi,
Thank you for your suggestion.
I am stil quite new to the syntax of R. I tried in a few ways but all
produced errors:
You might find working through "An Introduction to R"
enlightening. It's certain to be a more efficient
method than a guess-an
Hi Jurgens,
In the following post I show how to use balloonplot from qplots to do more
or less what you ask:
http://www.r-statistics.com/2010/02/nutritional-supplements-efficacy-score-graphing-plots-of-current-studies-results-using-r/
p.s: the code has a slight modification to it, so to handle ov
70 matches
Mail list logo