This is pretty important.
With freq = TRUE the y-axis label is "Frequency" and the heights of the panels
are equal to the frequency of the panel. However as the panel widths you have
requested are unequal, this implies that the *areas* of the panels, the really
important bit, cannot be proport
Hi r-expert,
I would like to plot histogram using frequency not density.
But I got the following warning.
obs.hist <-
hist(jan_data2[,4],right=FALSE,breaks=c(0,5,10,15,20,100),freq=TRUE,
+ xlab="Rain amt (mm)",ylim=c(0,3000),
+ main="Frequency of observed, Jan (1901-1990),
On Fri, 16 May 2008, Rolf Turner wrote:
I am fitting a logistic binomial model of the form
glm(y ~ a*x,family=binomial)
where a is a factor (with 5 levels) and x is a continuous predictor.
To assess how much ``impact'' x has, I want to compare the fitted
success probability when x =
I've been looking back over this discussion.
Another model that one can fit using lme is:
> lme(score~Machine, random=list(Worker=pdIdent(~0+Machine)),
+weights=varIdent(form=~1|Machine), data=Machines)
Linear mixed-effects model fit by REML
Data: Machines
Log-restricted-likelihood: -10
I am interested in whether the slopes in a linear model are different
from 0.
I.e. I would like to obtain the slope estimates, and their standard
errors,
``relative to 0'' for each group, rather than relative to some baseline.
Explicitly I would like to write/represent the model as
On Thu, May 15, 2008 at 5:31 PM, Charilaos Skiadas <[EMAIL PROTECTED]> wrote:
>
> On May 15, 2008, at 1:24 PM, David Katz wrote:
>
>>
>> Trying to learn Proto. This threw me:
>>
>> #startup r...
library(proto)
>>>
>>> a <- proto(x=10)
>>> a$x
>>
>> [1] 10
>>>
>>> x <- proto(x=100)
>>> x$x
Also, it's worth pointing out the reason for the numerical instability
of the parameter estimates: the predictors are nearly collinear.
> (dubious <- read.table('clipboard'))
V1 V2V3V4V5 V6 V7
1 1 300 39.87 39.85 39.90 39.87333 9
2 2 400 45.16 45.23 45.17 45.18667 1
I am fitting a logistic binomial model of the form
glm(y ~ a*x,family=binomial)
where a is a factor (with 5 levels) and x is a continuous predictor.
To assess how much ``impact'' x has, I want to compare the fitted
success probability
when x = its maximum value with the fitted probab
Thanks Duncan,
I achieve this:
grid.newpage()
for(h in 1:9)
{
pushViewport(viewport(layout=grid.layout(3,3)))
pushViewport(viewport(layout.pos.row=lin[h],layout.pos.col=colu[h]))
print(xyplot(tmx[,h]~frequ|as.factor(as.numeric(spf)),groups=as.factor(blm),
data=tmx,type="l",
xlab="frequency
Well at a minimum V4 and V6 (used in lm()) are not the same in these two
data sets. Not sure why but there it is.
Brian
Brian S. Cade
U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave., Bldg. C
Fort Collins, CO 80526-8818
email: [EMAIL PROTECTED]
tel: 970 226-9326
e-le
Thank you to all you eagle eyes; amendment made accordingly and solved. Not
sure how the difference occurred...
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
On 16/05/2008, at 9:44 AM, Charilaos Skiadas wrote:
This is exactly why we asked you for a reproducible example and
full code. That last entry in the V6 column is 69.65667 in this
case, but 66.27667 in the other cases. So you clearly are working
with two slightly different dodgy files, and
On May 15, 2008, at 5:37 PM, e-letter wrote:
Below is direct copy from command terminals of both pcs (mandrake 92
with r 171; mandriva 2008 with r 251, respectively).
R : Copyright 2003, The R Development Core Team
Version 1.7.1 (2003-06-16)
R is free software and comes with ABSOLUTELY NO WAR
Jim,
I think I'm almost there. When I use your formula it works and I can get the
job done, but I encounter the following problem
uniq <- setdiff(names(y), names(x)) OK
x[uniq] <- 0 OK
x NOT
Below is direct copy from command terminals of both pcs (mandrake 92
with r 171; mandriva 2008 with r 251, respectively).
R : Copyright 2003, The R Development Core Team
Version 1.7.1 (2003-06-16)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under
On May 15, 2008, at 1:24 PM, David Katz wrote:
Trying to learn Proto. This threw me:
#startup r...
library(proto)
a <- proto(x=10)
a$x
[1] 10
x <- proto(x=100)
x$x
Error in get("x", env = x, inherits = TRUE) : invalid 'envir' argument
Do I simply need to be careful to name proto obje
Derrick:
1. There are lots of people "out here" with such experience -- including the
author of the software!
2. nlme fitting involves iterative procedures whose final value (if indeed,
convergence to a final value occurs -- it certainly need not) depends on a)
the initial value you start from; (
Juan Pablo
Look at the results of:
as.numeric(A!=1)
and
A[A!=1]
HTH ...
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Juan Pablo Fededa
> Sent: Friday, 16 May 2008 1:36 a.m.
> To: r-help
> Subject: [R] value transformati
If I edit the fig file with Xfig, I have to change the value of
"special flag" to "special" and the font to a LaTeX font instead of a
postscript font.
If these changes are not made, the pstex_t file produced from fig2dev
doesn't contain the text as it should. So if I input the pstex_t in a
tex file
Trying to learn Proto. This threw me:
#startup r...
> > library(proto)
> a <- proto(x=10)
> a$x
[1] 10
> x <- proto(x=100)
> x$x
Error in get("x", env = x, inherits = TRUE) : invalid 'envir' argument
>
Do I simply need to be careful to name proto objects and proto components
uniquely? Is this t
On 16/05/2008, at 7:23 AM, e-letter wrote:
Well, I sought a statistician who showed me how to do this task using
mathematica. Despite advice otherwise,
You are certainly getting bad advice!
I am interested to learn how to
perform this basic task using r because it's free and and use
Two comments. First of all, I don't see how you can be sure that if
you specify 365 bins, then each bin will contain exactly one day. In
order to do that, you need to know that each bin has width exactly 1,
and you don't tell lattice to use such a width, so it is likely
choosing something e
On Thu, May 15, 2008 at 3:05 PM, e-letter <[EMAIL PROTECTED]> wrote:
> Using version 251 I tried the following command:
>
> lm(y~a+b,data=datafile)
>
> Resulting in, inter alia:
> ...
> coefficients
> (intercept) a
> 1.2 3.4
>
[...]
> When using version 171 I entered the same command:
>
> lm(y~a+
On 15/05/2008, Michael Kubovy <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Your reply doesn't help you with your lm() problem. You need to show the
> problem with lm() as well. Your original message was unclear on what is
> wrong.
The problem I have with lm() is that when I enter this command, I
obtain di
been puzzling over this for a day.
Summary
integer variable to use with histogram, 170,000 rows. Value is day of
year. Hist works, lattice histogram with nint does not work (spurious
spikes in display), lattice histogram using breaks=c(0:365) works
fine. Spike values appear to be sum of two adj
Greetings and Salutations,
I was curious if anyone out there has had much experience with the nlme function
in both S+ and R. Right now I am working on an HIV dataset and trying to fit a
NLME model to the data, and the coefficients I get in S+ differ slightly from
the coefficients in R:
R model
After constructing the new dataframe, you can always reorder the columns in
any order that you want by creating a character vector of the order that you
want and then using it as:
mydf[my.ordered.names]
You may have to give a better example of what the input and output would
look like.
On Thu, Ma
Jim,
The problem with your solution is that the columnames are not in the same
order as in the dataframe SDF2
The "dummy columns" are just put at the end of the dataframe SDF1. I keep
looking for a better solutions. Thx for the effort.
Bert
_
From: jim holtman [mailto:[EMAIL PROT
On May 15, 2008, at 2:07 PM, lamack lamack wrote:
Dear all, someone could explain why the following example is not a
valid
randomization scheme?
Consider an experiment in which the
six experimental units to be used are permanently fixed in a row and
two treat-
ments are to be randomly ass
Dear all, someone could explain why the following example is not a valid
randomization scheme?
Consider an experiment in which the
six experimental units to be used are permanently ï¬xed in a row and two treat-
ments are to be randomly assigned to the units. (One can think of fruit trees
or a s
Dear all,
Today we released a new task view on CRAN which deals with R packages
closely related to the wide field of optimization. It can be found on
http://cran.R-project.org/web/views/Optimization.html.
The focus of this task view is on *General Purpose Continuous Solvers*,
*Mathematical
Thankyou Brian (and others). Very useful information(as usual).
-- Bert
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 14, 2008 10:29 PM
To: Bert Gunter
Cc: r-help@r-project.org
Subject: Re: [R] Attributes or list programming "efficiency"
On W
On 5/15/08, RINNER Heinrich <[EMAIL PROTECTED]> wrote:
> Thanks for your help!
> I guess I could have thought for ages about this, and never would such a
> solution have come to my mind ;-)
> It works as far as the text in the strips is left-aligned; a remaining
> drawback
> is that printing o
Dear Peter,
the call works for me; e.g.
x <- matrix(rnorm(100), ncol = 4)
heatmap.2(x, dendrogram="none", Colv = FALSE, Rowv = FALSE)
There seems to be something wrong with your matrix z ...
Best,
Matthias
Peter Scacheri wrote:
Thanks Matthias,
I tried that, but received the following error
On Thu, 15 May 2008, Robert wrote:
Hello
I'm using the xfig-function in R to export figures in fig-format. To
use these exported figures in LaTeX, I first run a fig2dev to get a
pstex and pstex_t file. However, in order to get the right pstex_t
file (that is, with the text of the original figur
Duccio - gmail.com> writes:
>
> Quantreg package allows to plot the summary of models derived by quantile
> regression at different taus.
..
> Here the main code:
>
> model<- rq(y~x,data=dataset, tau = 0.8:10/10) # here is the model
>
> model.summary<- summary(model)
>
> plot(sfm) # this
Thank you very much for your help Don MacQueen
Don MacQueen wrote:
>
>
> At 1:24 PM -0700 5/14/08, ermimi wrote:
>>Patrick and Blay Thank you very much for help me, I have drawn in blue the
>>axis
>>Blay the solution that you give me for start in (-10,-10) and finish in
>>(10,10) isn´t
Claudia D'Aniello yahoo.it> writes:
>
> Dear R users,
> someone knows how to remove auto-correlation from a frequencies time series?
> I've tried by differencing (lag 1) the cumulative series (in order to have
only positive numbers) , but I
> can't remove all auto-correlation.
> If it's useful I
Claudia D'Aniello yahoo.it> writes:
>
> Dear R users,
> someone knows how to remove auto-correlation from a frequencies time series?
> I've tried by differencing (lag 1) the cumulative series (in order to have
only positive numbers) , but I
> can't remove all auto-correlation.
Take the residu
Hi,
I have a dataframe SDF1 that looks like this:
Char1 Char2 Char 3 W.2007.02 W.2007.09 W.2007.16 W.2008.13
AC1F1 F2 F3
AC2
F4
BC3 F5
F6
I have another dataframe S
On Thu, May 15, 2008 at 9:22 AM, Luis Cayuela <[EMAIL PROTECTED]> wrote:
> Hi everybody,
> I am trying to fit a model with the lmer function for mixed effects. I have
> an experimental design consisting of 5 field plots. Each plot is divided in
> 12 subplots where the influence of three factors
e-letter gmail.com> writes:
>
> 2008/5/15 Douglas Bates stat.wisc.edu>:
> > Did you happen to notice the part at the bottom of every message about
> > "provide commented, minimal, self-contained, reproducible code"?
> >
> Sorry, don't understand what that statement means in my context.
It me
Dear R users,
someone knows how to remove auto-correlation from a frequencies time series?
I've tried by differencing (lag 1) the cumulative series (in order to have only
positive numbers) , but I can't remove all auto-correlation.
If it's useful I can send my db.
x <- # autocorrelate
heatmap.2(z, col = greenred(100), dendrogram = "none", Rowv = FALSE)
NULL isn't one of the accepted values for the dendrogram argument. See
?heatmap.2
Best,
Jim
Peter Scacheri wrote:
Using the heatmap.2 function, I am trying to generate a heatmap of a 2
column x 500 row matrix of numeric
Quantreg package allows to plot the summary of models derived by quantile
regression at different taus.
The plot shows the parameters variation by varying taus: intercept and slope
(for a linear model).
Together with these values even confidence intervals may be plotted, based
on the threshold gi
Dear All:
I am new in Linux and I have inherited a Linux redhat system with "R Version
2.1.0 (2005-04-18)" installed. Can somebody help me with step by step
instructions to download the new version and install it?
Thanks
mjacob
The contents of this communication, including any attachments,
Hi everybody,
I am trying to fit a model with the lmer function for mixed effects. I have an
experimental design consisting of 5 field plots. Each plot is divided in 12
subplots where the influence of three factors on the growing of tree seedlings
is tested: (1) seed (1 = presence; 0 = absen
Hello
I'm using the xfig-function in R to export figures in fig-format. To
use these exported figures in LaTeX, I first run a fig2dev to get a
pstex and pstex_t file. However, in order to get the right pstex_t
file (that is, with the text of the original figure) I have to change
the font and speci
I have a problem finding how to use prior.weights or weights options when
performing a stepwise GAM analysis (gam and step.gam functions) for
covariate inclusions.
Thanks beforehand for references or help on how to handle these 2 options.
--
Paul Baverel, MSc,
PhD student
Div. of Pharmacokinetics
Dear contributors:
I have vector A composed of numbers wich have values equal to 1 and
different to 1.
I want to transform de components with a value=1 to a component of value=0,
and those with a value different to1, to a value=1.
Then I want to take out the components=0.
Thanks in advance,
Juan
By RD library I mean the xport library...
Shubha Karanth | Amba Research
Ph +91 80 3980 8031 | Mob +91 94 4886 4510
Bangalore * Colombo * London * New York * San José * Singapore *
www.ambaresearch.com
-Original Message-
From: Shubha Vishwanath Karanth
Sent: Thursday, May 15, 2008 7:21
Hi All,
I'm accustomed to performing an ANOVA to aid in choosing between
linear models (for example y~x or y~x+x^2), however with different
models I can't seem to do it. I'm trying to fit an exponential model
of the form ye^(bt).
Below is a code snippet that highlights what I'm trying to do
s =
Professor Kubovy
As you instructed, below is the command terminal output:
sessionInfo()
R version 2.5.1 (2007-06-27)
i586-mandriva-linux-gnu
locale:
LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;L
Oh!...Got that...A member in the RD library of SAS can contain only 8
characters in its filename. Since the variables 'tsubset1',
'tsubset2','tsubset9' had exactly 8 letters in the name, those files read
properly and then onwards, since the number of letters/characters exceeded
8, those
Thanks Matthias,
I tried that, but received the following error message:
Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + :
dimensions of z are not length(x)(+1) times length(y)(+1)
-Peter
At 10:18 AM +0200 5/15/08, Matthias Kohl wrote:
Dear Peter,
heatmap.
After running the codes in the log file, I realized that this has something to
do with SAS only...
Shubha Karanth | Amba Research
Ph +91 80 3980 8031 | Mob +91 94 4886 4510
Bangalore * Colombo * London * New York * San José * Singapore *
www.ambaresearch.com
-Original Message-
From: S
2008/5/15 Douglas Bates <[EMAIL PROTECTED]>:
> Did you happen to notice the part at the bottom of every message about
> "provide commented, minimal, self-contained, reproducible code"?
>
Sorry, don't understand what that statement means in my context.
> Considering that the result you quote from "
Hi Peter,
Realized that the log files are generated only when there is an error. Here are
my contents of the log file:
libname src2rd 'Z:/data';
libname rd xport
'C:\DOCUME~1\SHUBHA~1.AMB\LOCALS~1\Temp\1\RtmpObHuqk\file323b4e45';
proc copy in=src2rd out=rd;
select tsubset10 ;
Shubha Karanth |
http://ion.researchsystems.com/IONScript/wavelet/ sorry about the broken
link above. I will have a look- I also found an R function that will plot
close to what I want on a website I will compare the two and get back with
everybody. thanks for all of the help.
Stephen
On Wed, May 14, 2008 at 1:
Hi,
To get help with this problem, you will have to create an example that
others can duplicate. That is why each message to the list says (at
the bottom): "PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproduc
Did you happen to notice the part at the bottom of every message about
"provide commented, minimal, self-contained, reproducible code"?
Considering that the result you quote from "251" has 2 coefficients
and the result from "171" has 3 coefficients one might contemplate the
possibility that you ar
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Seems that it gets deleted But lemme try again by providing the arguments...
Shubha Karanth | Amba Research
Ph +91 80 3980 8031 | Mob +91 94 4886 4510
Bangalore * Colombo * London * New York * San José * Singapore *
www.ambaresearch.com
-Original Message-
From: Peter Dalgaard [mailt
Sorry for not translating, misspackaging (MASS) and not reading
properly (zerodist).
I would like to implement the weighting in distance()
foo <- function(x, method, ...)
as.dist(distance(x = x, method = method,
weights=vectorname))
This seems to work but it would b
Shubha Vishwanath Karanth wrote:
> Hi R,
>
>
>
> Suppose that SAS dataset 'tsubset1' is stored in the path, "Z:/data".
> Then I give the below read.ssd() command to read SAS dataset,
> 'tsubset1.sas7bat' into R.
>
>
>
>
>> library(foreign)
>>
>
>
>> s=read.ssd("Z:/data","tsubset1",sa
On Thu, 15 May 2008, Tom La Bone wrote:
I would like all three of these calculations to give an answer in days (or at
least the same units):
as.POSIXct("1971-08-01 00:00:00") - as.POSIXct("1971-08-01 00:00:00")
Time difference of 0 secs
as.POSIXct("1971-08-01 12:00:00") - as.POSIXct("1971-
Dear all,
I want to find the optimal values of a vector, x (with 6 elements)
say, satisfying the following conditions:
1. for all x>=0
2. sum(x)=1
3. x[5]<=0.5 and x[6]<=0.5
For the minimisation I'm using nlminb and to satisfy the first 2
conditions the logistic transformation is used with box c
Tom La Bone wrote:
I would like all three of these calculations to give an answer in days (or at
least the same units):
as.POSIXct("1971-08-01 00:00:00") - as.POSIXct("1971-08-01 00:00:00")
Time difference of 0 secs
as.POSIXct("1971-08-01 12:00:00") - as.POSIXct("1971-08-01 00:00:00")
Time
The "terminal" terminology seemed confusing at first but it appears
to refer to launching R from a Windows cmd session and in that case,
yes, it outputs to that Windows cmd session window (as opposed to the
Rgui window) which seems sufficient.
I did find it acts strangely when used in conjunction
I would like all three of these calculations to give an answer in days (or at
least the same units):
> as.POSIXct("1971-08-01 00:00:00") - as.POSIXct("1971-08-01 00:00:00")
Time difference of 0 secs
>
> as.POSIXct("1971-08-01 12:00:00") - as.POSIXct("1971-08-01 00:00:00")
Time difference of 12 h
Readers,
Using version 251 I tried the following command:
lm(y~a+b,data=datafile)
Resulting in, inter alia:
...
coefficients
(intercept) a
1.2 3.4
Packages installed:
acepack ace() and avas() for selecting regression
transformations
adlift
Dear all,
I have a problem finding how to use properly prior.weights and weights
options when performing a stepwise GAM analysis (gam and step.gam functions
of GAM package) for covariate inclusions.
The code I use is coming from the documentation and I do not get any error
messages but not expected
On Thu, 2008-05-15 at 13:13 +0200, Birgit Lemcke wrote:
> Hello R-user community!
>
> I am running R 2.7.0 on a Power Book (Tiger). (I am still R and
> statistics beginner)
>
> Presently I try to run the function metaMDS (vegan) using an existing
> dissimilarity-matrix.
The help for metaMDS
Hello R-user community!
I am running R 2.7.0 on a Power Book (Tiger). (I am still R and
statistics beginner)
Presently I try to run the function metaMDS (vegan) using an existing
dissimilarity-matrix.
As I would like to start with this matrix I thought I could just give
the matrix using
On 5/15/2008 5:05 AM, Patrick Hausmann wrote:
Dear list,
I have a dataframe like this:
w <- c(1.2, 1.34, 2.34, 3.12, 2.43, 1.99, 2.01, 2.23, 1.45, 1.59)
g <- rep(c("a", "b"), each=5)
df <- data.frame(g, w)
df
df
gw
1 a 1.20
2 a 1.34
3 a 2.34
4 a 3.12
5 a 2.43
6 b 1.99
7 b 2.01
On May 15, 2008, at 3:18 AM, RINNER Heinrich wrote:
Thanks for your help!
I guess I could have thought for ages about this, and never would
such a solution have come to my mind ;-)
It works as far as the text in the strips is left-aligned; a
remaining drawback is that printing of longer text
Hi R,
Suppose that SAS dataset 'tsubset1' is stored in the path, "Z:/data".
Then I give the below read.ssd() command to read SAS dataset,
'tsubset1.sas7bat' into R.
> library(foreign)
> s=read.ssd("Z:/data","tsubset1",sascmd = "C:/Program Files/SAS/SAS
9.1/sas.exe")
> s
A B C
1 3 4 5
Naira wrote:
Hi all,
I would like to know if it is possible in R to give a the reference of a
variable in a function; in order to be able to change the variable in the
function and to keep the change when the function ended.
In other words, is it possible to code this following C code in R:
voi
Dear list,
I have a dataframe like this:
w <- c(1.2, 1.34, 2.34, 3.12, 2.43, 1.99, 2.01, 2.23, 1.45, 1.59)
g <- rep(c("a", "b"), each=5)
df <- data.frame(g, w)
df
df
gw
1 a 1.20
2 a 1.34
3 a 2.34
4 a 3.12
5 a 2.43
6 b 1.99
7 b 2.01
8 b 2.23
9 b 1.45
10 b 1.59
Using tapply to
Hi all,
I would like to know if it is possible in R to give a the reference of a
variable in a function; in order to be able to change the variable in the
function and to keep the change when the function ended.
In other words, is it possible to code this following C code in R:
void functionName
Hi
one way is tu use arrows with code 3 and angle 90 the other is to use
gplot or plotrix packages.
See
http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-base:errbars
Regards
Petr
[EMAIL PROTECTED]
724008364, 581252140, 581252257
[EMAIL PROTECTED] napsal dne 14.05.2008 23:04:16:
>
> I have a vector:
>
> q1<-c(4660,5621,5629,8030,8080,8180,8501,8190,8370,8200)
>
> The following command gives me the mean of its elements:
>
> mean(q1)
> [1] 7346.1
>
> What can I do to do the same for the variable 'height', but only for the
> cases/rows which have one of the elements of q1
Dear Dimitris, dear Matthias,
thank you very much, I adapted the short solution you both provided -
works as intended. And I have learned sth. once again.
Regards,
Stefan
Dimitris Rizopoulos schrieb:
try this:
q1 <- c(4660,5621,5629,8030,8080,8180,8501,8190,8370,8200)
dat <- read.table(tex
You appear to be doing the differencing twice. Do it only in arima, and
not in the data you supply.
On Thu, 15 May 2008, Habib, Mohamed A F A M wrote:
I have the following model:
m1.dis=arima(diff(diff(log(ts1),lag=12)),order=c(0,1,1),seasonal=list(order=c(0,1,1),period=12))
I would like to
There have been several solutions like:
k[k != 3]
The more general form of this idea is:
k[!(k %in% 3)]
Sticking closer to the original form would be:
out <- which(k == 3)
if(length(out)) k[-out] else k
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S
Dear Stefan,
what about
q1<-c(4660,5621,5629,8030,8080,8180,8501,8190,8370,8200)
x <- data.frame(number = c(4660, 5010, 5621, 5629, 8030, 8080 , 8090,
8180, 8501, 8190, 8200, 8370, 8200), height = c(2.5, 1.4, 0.8, 2.3, 2.5,
2.4, 0.9, 1.4, 1.2, 1.9, 2.0, 2.1, 1.8))
ind <- x[,"number"] %in% q1
try this:
q1 <- c(4660,5621,5629,8030,8080,8180,8501,8190,8370,8200)
dat <- read.table(textConnection(
"number height
1 4660 2.5
2 5010 1.4
3 5621 0.8
4 5629 2.3
5 8030 2.5
6 8080 2.4
7 8090 0.9
8 8180 1.4
9 8501 1.2
10 8190 1.9
11 8200 2.0
12 8370 2.1
13 8200 1.8"), header = TRUE)
clos
Dear R users:
I want to fit my data with zipf distribution using VGAM package, I used the
following script:
w<-read.csv("the data file path")
y<-1:length(w)
fit = vglm(y ~ 1, zipf(link=identity, init=0.5), tra=TRUE, weight=w)
After run it, I encountered the problem : ghar
Dear Peter,
heatmap.2(z, dendrogram = "none", Rowv = FALSE, Colv = FALSE)
should do what you want.
Best,
Matthias
Peter Scacheri wrote:
Using the heatmap.2 function, I am trying to generate a heatmap of a 2
column x 500 row matrix of numeric values. I would like the 1st
column of the matrix
I have the following model:
m1.dis=arima(diff(diff(log(ts1),lag=12)),order=c(0,1,1),seasonal=list(order=c(0,1,1),period=12))
I would like to know how to plot the correct predictions in the original units
because I am trying the following code but it is not working.
I believe that there must be s
Hi,
I have a vector:
q1<-c(4660,5621,5629,8030,8080,8180,8501,8190,8370,8200)
The following command gives me the mean of its elements:
mean(q1)
[1] 7346.1
What can I do to do the same for the variable 'height', but only for the
cases/rows which have one of the elements of q1 as 'number':
Or
> k <- c(1,1,1,2,2,1,1)
> k[!(k==3)]
[1] 1 1 1 2 2 1 1
>
On Wed, May 14, 2008 at 1:59 PM, Julian Burgos
<[EMAIL PROTECTED]> wrote:
> Try this:
>
> k=c(1,1,1,2,2,1,1,1)
>
>> k[(k!=1)]
> [1] 2 2
>
>> k[(k!=2)]
> [1] 1 1 1 1 1 1
>
>> k[(k!=3)]
> [1] 1 1 1 2 2 1 1 1
>
> Julian
>
>
> Shubha Vishwa
Thanks for your help!
I guess I could have thought for ages about this, and never would such a
solution have come to my mind ;-)
It works as far as the text in the strips is left-aligned; a remaining drawback
is that printing of longer texts will be continued outside the right border of
their st
G'day Shuba,
On Thu, 15 May 2008 12:18:58 +0530
"Shubha Vishwanath Karanth" <[EMAIL PROTECTED]> wrote:
> Getting a strange result using ?apply. Please look into the below
> codes:
>
> d=data.frame(a=c(1,2,3),b=c("A","B","C"),c=c(TRUE,FALSE,FALSE),d=c(T,F,F))
>
> > class(d[,1])
>
> [1] "numeric"
94 matches
Mail list logo