Hi,
I try to add items to a vector, but when the it has existed, the item should be
skipped.
does anyone know how to do it a simple way?
Yu
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
2008/8/28 Yuan Jian [EMAIL PROTECTED]:
Hi,
I try to add items to a vector, but when the it has existed, the item should
be skipped.
does anyone know how to do it a simple way?
You might be able to use unique().
Regards,
Nicky Chorley
__
Hi all,
I have some rough code to sample consecutive integers with length
according to a vector of lengths
#sample space (representing positions)
pos-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
#sample lengths
lengths-c(2,3,2)
From these two vectors I need a vector of sampled
Hi,
Is there any quick and easy way to rename a number of objects, without
having to rename each one individually and then remove the old one? And
if so, is there anything I can do to adjust the associated comments
accordingly?
Thanks for any help,
Robin Williams
Met Office summer intern -
On a windows machine you get the same problem. Useless one uses tha same
trick as Rolf suggested: don't install the packages in the default
directory and set R_LIBS to that directory. Then all you need to do
after an upgrade is to set R_LIBS in the new version and run
update.package(checkBuilt =
Kevin,
Notice the subtle difference between Hadley's and your code:
Hadley
m2008$DayOfYear - factor(m2008$DayOfYear, levels = 1:365)
Kevin
m2007$DayOfYear - factor(m2008$DayOfYear, levels = 1:365)
Your are using the m2007 object instead of the suggested m2008 object!
HTH,
Thierry
Dear Paul,
How are you generating (saving) your plots? I tend to play with the
pointsize argument of the graphical device, something in conjunction
with the size argument in ggplot2 (size of points and lines). Working
like that I get plots with nicely propotioned labels without overlaps.
HTH,
Hi
[EMAIL PROTECTED] napsal dne 28.08.2008 02:55:34:
Hi,
I am reading numeric data as below but the problem is the object ndata1
and
nd1 have characters instead of numeric values. I want to keep it as
numeric.
Why the type has changed from numeric to character and how to avoid this
On Wed, 2008-08-27 at 09:48 -0300, Henrique Dallazuanna wrote:
See
http://www1.maths.lth.se/help/R/RCC/
The R Internals manual that is shipped with R also has a section on
coding standards:
http://cran.r-project.org/doc/manuals/R-ints.html#R-coding-standards
though this is quite short and
Hi,
sqldf is a fantastic package, but when the SELECT procedure runs unused
levels remain in the output. I tried with the drop function, but without
success. Do you have any suggestions?
Thanx, Gianandrea
data(iris)
require(sqldf)
base-sqldf(select * from iris where Species 'setosa')
str(base)
Bert Gunter wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Robert Baer
Sent: Wednesday, August 27, 2008 3:42 PM
To: r-help@r-project.org
Subject: Re: [R] How to learn R language?
but I doubt you'll ever be done
learning because the project
Hi Bill,
Since x, y,and z all have measurement errors attached, the proper way
to do the fit is with principal components analysis, and to use the
first component (called loadings in princomp output).
The easiest way for you to do this is to use the pcr [principal component
regression]
While agreeing with how good the texts that have been suggested are,
the questions to me (language + systematic) suggests
Braun and Murdoch A first course in statistical programming or/and
Chambers Software for data analysis: programming with R
These would seem to take you through developing
If you want to suppress the unused level of Species, you can use factor() :
table(base$Species)
table(factor(base$Species))
2008/8/28 glaporta [EMAIL PROTECTED]
Hi,
sqldf is a fantastic package, but when the SELECT procedure runs unused
levels remain in the output. I tried with the drop
Hello,
I'm Giovanni from ROMA..
I can't find a solution for the error:
error using packet 1
the y field is not specified and it has not a default value
(this is my traslation from italian language)
The code is:
pc-qqmath(~valori,
distribution=function(p) qweibull(p,beta,alpha),
Dear All,
I have a question which seems trivial, but I reached a dead end.
I have a set of points (measurements) and I used lm() to obtain their linear
regression model. From the biological background this line must pass through
a point (100,0). Our dataset is not optimal and it shows a slight
I have to make a simulation testing the Bayesian Robustness of a normal
linear model and comparing the regression results obtained using two
different g-priors. I tried with the function blinreg() in the LearnBayes
package from J.Albert but it doesn't help me because it uses a standard flat
Hi Thierry,
Thanks for your reply. I use the pdf graphics device. I did not know
about the pointsize option so I will take a look. Here is an example of
what I might do.
pdf(onefile=FALSE, width=10, height=7)
ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() + theme_bw
Dear Thierry,
The pointsize option works perfectly for me.
Thanks,
Paul
ONKELINX, Thierry wrote:
Dear Paul,
How are you generating (saving) your plots? I tend to play with the
pointsize argument of the graphical device, something in conjunction
with the size argument in ggplot2 (size of
Hi all,
When using lm to model a response with 8 explanatory variables, one of
the variables is not defined due to singularities. I have checked the
csv file from which the data come, there are no na's in the dataset,
etc. What should I be looking for in this variable to correct the
problem?
Dear All:
Greetings!
By the way, is it possible to have a graph (say line graph) that shows
values as well (say y-axis values within the graph)? One could do it in
excel. I am just wondering whether it is possible with R!
Thanks in advance,
Prasanth VP,
Global Manager - Biometrics,
Dear Graham,
Recently a course with this title, from Vose consulting, was announced
on the list. Does anyone know of any books/websites/downloadable
tutorials etc that cover the same ground.
There is an R package QRMlib on CRAN
http://cran.r-project.org/web/packages/QRMlib/index.html
that
Hi
does somebody know how to plot single letters in a text in different
colours?
example 1:
I would like to add the word ABC to a figure. Thereby each letter should
have a different colour.
text(x,y,ABC, col=c(1,2,3)) # this does not work
example 2:
I would like to add the name of a
names, colnames, rownames - list of names
I think it depends on what you are renaming?
Stephen
On Thu, Aug 28, 2008 at 4:03 AM, Williams, Robin
[EMAIL PROTECTED] wrote:
Hi,
Is there any quick and easy way to rename a number of objects, without
having to rename each one individually and then
On 28-Aug-08 11:04:47, Wi lliams, Robin wrote:
Hi all,
When using lm to model a response with 8 explanatory variables,
one of the variables is not defined due to singularities.
I have checked the csv file from which the data come, there are
no na's in the dataset, etc. What should I be
In R-devel
na.action(GLM)
will work as the extractor. The problem with attr(GLM$model, na.action)
is that the 'model' component is optional, and with
model.frame(ModelObject) that if the 'model' component has been omitted it
will try to recreate the model frame from the currently visible
Tobias,
Thanks I will give this a look, it seems the focus is on credit risk
(where I am more interested in environmental risks) but it should
still be useful.
Graham
2008/8/28 Tobias Verbeke [EMAIL PROTECTED]:
Dear Graham,
Recently a course with this title, from Vose consulting, was
2008/8/28 Fränzi Korner [EMAIL PROTECTED]:
example 1:
I would like to add the word ABC to a figure. Thereby each letter should
have a different colour.
text(x,y,ABC, col=c(1,2,3)) # this does not work
kludge alert!
How about:
text(x,y,ABC,col=3)
text(x,y,AB,col=2)
text(x,y,A,col=1)
Dear R users,
I'd like to announce a new package on CRAN called ``denstrip''. It
implements ``density strips'' and other graphical methods for
illustrating and comparing distributions in a compact fashion.
Posterior distributions of parameters are often summarised using point
and line drawings
somehow robust method for dataframe df would be
newdf - (df[,seq(1,66,2)]+df[,seq(2,66,2)])/2
Gasper
-Original Message-
From: JonD [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2008 3:47 PM
To: r-help@r-project.org
Subject: [R] averaging pairs of columns in a dataframe
Hi! I want to plot three graphs (residuals, ACF and PACF of a
model). Ideally I would use a c(2,2) disposition where the residuals
plot would start at position 1,1 and span to position 1,2. Then I would
plot the ACF in position 2,1 and the PACF in position 2,2. Maybe is
clearer like this:
See ?strwidth, e.g.
plot(1)
text(1.1, 1.1, A)
text(1.1 + strwidth(A), 1.1, B, col = 2)
text(1.1 + strwidth(AB), 1.1, C, col = 3)
On Thu, Aug 28, 2008 at 7:33 AM, Fränzi Korner
[EMAIL PROTECTED] wrote:
Hi
does somebody know how to plot single letters in a text in different
colours?
example
Try this:
l - layout(matrix(c(1, 2, 1, 3), 2))
layout.show(l)
On Thu, Aug 28, 2008 at 9:40 AM, Jose Luis Aznarte M.
[EMAIL PROTECTED] wrote:
Hi! I want to plot three graphs (residuals, ACF and PACF of a model).
Ideally I would use a c(2,2) disposition where the residuals plot would
start
That would be one source of error. Thank you.
Kevin
ONKELINX wrote:
Kevin,
Notice the subtle difference between Hadley's and your code:
Hadley
m2008$DayOfYear - factor(m2008$DayOfYear, levels = 1:365)
Kevin
m2007$DayOfYear - factor(m2008$DayOfYear, levels = 1:365)
Your are
On Tue, 26 Aug 2008, Eric DeWitt wrote:
I encountered an error that does not make sense to me given my reading
of the documentation and does not appear to be referenced in the list
archives or online. The error occurred when a function received a NULL
value rather than a numeric value as a
Prasanth wrote:
Dear All:
Greetings!
By the way, is it possible to have a graph (say line graph) that shows
values as well (say y-axis values within the graph)? One could do it in
excel. I am just wondering whether it is possible with R!
x - rnorm(100,2,3)
y - rnorm(100,2,3)
James Milks wrote:
The title says it all. Does anyone know of a way to save your packages
when you upgrade to a new version of R? This may seem petty, but I'm
accumulating enough packages that having to download and install each of
them anew every time I install a new version of R is rather
On Thu, 28 Aug 2008, Barry Rowlingson wrote:
2008/8/28 Fränzi Korner [EMAIL PROTECTED]:
example 1:
I would like to add the word ABC to a figure. Thereby each letter should
have a different colour.
text(x,y,ABC, col=c(1,2,3)) # this does not work
kludge alert!
How about:
library(HH)
example(tsacfplots)
?tsacfplots
__
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,
On Thu, 28 Aug 2008, Jose Luis Aznarte M. wrote:
Hi! I want to plot three graphs (residuals, ACF and PACF of a model).
Ideally I would use a c(2,2) disposition where the residuals plot would start
at position 1,1 and span to position 1,2. Then I would plot the ACF in
position 2,1 and the
On Thu, 28 Aug 2008, Michael Friendly wrote:
James Milks wrote:
The title says it all. Does anyone know of a way to save your packages
when you upgrade to a new version of R? This may seem petty, but I'm
accumulating enough packages that having to download and install each of
them anew
Hi,
The answer can be obtained in closed form using the pgamma function,
which is closely related to the incomplete gamma function, as follows:
integrand - function (t, x) {
exp(-2*t)*(2*t)^x/(10*factorial(x))
}
upper - 10
x - 0:44
ans1 - sapply(x, function(x) integrate(integrand,
On Thu, 2008-08-28 at 07:39 -0400, stephen sefick wrote:
names, colnames, rownames - list of names
I think it depends on what you are renaming?
Those alter the dimnames of objects that have them, not the names of the
objects themselves.
I think a short answer to the question is no. There is a
Dear R users,
I still feel new to R so please apologize if I am doing something stupid
here. My use of the polygon() function produces a result that I cannot
comprehend: In a plot, I would like to shade the area below a normal
distribution. However, I do not want the entire area to be shaded,
Thanks,
I've managed to make some progress, but seem to be getting some strange
results from my kriging, which I think much have something to do with a
problem with my prediction points.
I have my geodata object (called nicola), my prediction points (predpoints,
imported from a csv containing
Bertolt Meyer wrote:
Dear R users,
I still feel new to R so please apologize if I am doing something
stupid here. My use of the polygon() function produces a result that I
cannot comprehend: In a plot, I would like to shade the area below a
normal distribution. However, I do not want the
hadley wickham schrieb:
Hi Stefan,
Could you be a bit more explicit? Do you have an example dataset that
you are trying to visualise?
Right, thanks for pointing out the obvious.
So here's my code:
library(gplots)
quarter - as.factor(sample(c(Q1, Q2, Q3, Q4),
100, replace =
library(HH)
normal.and.t.dist()
There are many related examples in
example(normal.and.t.dist)
__
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
Bertolt,
The points you send to polygon() do not fully enclose the area you desire. Try
adding one more point as such
xt - c(x[(length(x)-cutpoint):length(x)],linepos)
yt - c(y[(length(y)-cutpoint):length(y)],0)
polygon(xt, yt, density = 10 )
-Original Message-
From: [EMAIL
Speaking for myself, I think it's easier to just create a script and
put it somewhere easy to remember.
For example
my.pkgs - c('pkg1', 'pkg2') ## and so on for my preferred packages
install.packages(my.pkgs, dependencies=TRUE)
Then after each upgrade just source the script.
You will
The power.examp function in the TeachingDemos package (among others) may
already do what you want. Even if it does not, it does shade the area under a
curve, you can look at the source for the function as an example of where to
start.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
At 04:12 AM 8/28/2008, ONKELINX, Thierry wrote:
On a windows machine you get the same problem. Useless one uses tha same
trick as Rolf suggested: don't install the packages in the default
directory and set R_LIBS to that directory. Then all you need to do
after an upgrade is to set R_LIBS in
Hi Valerie
Valerie Obenchain wrote:
Hi,
Has anyone successfully used RCurl for posting data to a
password-protected site?
Yes. I just set up a sample form to test with and the following
all work
# Perl script (and HTML form for testing in the browser) taken from
#
Hello,
I have a text file with this structure:
# File created = Thursday, August 28, 2008 3:33:02 PM GMT
# Data set = 373 2 1 C:\Bruker\TOPSPIN GABRMN
# Spectral Region:
# LEFT = 4.5 ppm. RIGHT = 0.5 ppm.
#
# SIZE = 13111 ( = number of points)
#
# In the following ordering is from the 'left'
Dear R users,
I am currently writing a R package and to do so I am following the
guidelines in manual 'Writing R extensions'.
In Section 3.1, it is suggested to tidy up the code using a file
containing the following:
options(keep.source = FALSE)
source(myfuns..R)
dump(ls(all = TRUE), file =
On Thu, Aug 28, 2008 at 9:31 AM, Stefan Uhmann
[EMAIL PROTECTED] wrote:
hadley wickham schrieb:
Hi Stefan,
Could you be a bit more explicit? Do you have an example dataset that
you are trying to visualise?
Right, thanks for pointing out the obvious.
So here's my code:
On 28/08/2008 10:46 AM, Marie Pierre Sylvestre wrote:
Dear R users,
I am currently writing a R package and to do so I am following the
guidelines in manual 'Writing R extensions'.
In Section 3.1, it is suggested to tidy up the code using a file
containing the following:
options(keep.source =
Is this what you want to do:
x - scan('clipboard', what=, sep=\n)
Read 18 items
x
[1] # File created = Thursday, August 28, 2008 3:33:02 PM GMT
[2] # Data set = 373 2 1 C:\\Bruker\\TOPSPIN GABRMN
[3] # Spectral Region:
[4] # LEFT = 4.5 ppm. RIGHT = 0.5 ppm.
[5] #
[6] # SIZE = 13111 (
Try this:
x - readLines('clipboard')
newx - as.numeric(x[setdiff(seq(length(x)), grep(^#, x))])
comment(newx) - grep(^#, x, value = TRUE)
newx
comment(newx)
On Thu, Aug 28, 2008 at 12:41 PM, Dani Valverde [EMAIL PROTECTED]wrote:
Hello,
I have a text file with this structure:
# File created
Not the prettiest code but it returns what you want. Might be slow for
large dataframes.
df - data.frame( ID=c(1,1,1,1,2,2),
TEST=c(A,A,B,C,B,B),
RESULT=c(17,12,15,12,8,9) )
big.out - list(NULL)
for( uID in unique(df$ID) ){
m - df[ df$ID == uID, ,
Try reading help(hclust) and help(matplot) and run the examples given in
the documentation. If that doesn't work, try posting again with a simple
reproducible example.
Regards, Adai
Marco Chiapello wrote:
Hi all,
I'm trying to do a cluster analysis,but I don't know if it's possible in
the
this is for the person who asked me about prediction confidence
intervals in a GLM because I lost your email. Below follows a simple
example in CAR and the variance covariance of the beta coefficients is
in the summary. So, I think, given that output, it should be pretty
straightforward to do
I have a set of points (measurements) and I used lm() to obtain their linear
regression model. From the biological background this line must pass through
a point (100,0). Our dataset is not optimal and it shows a slight deviation
from that coordinate. How can I add the restraint to the model,
WHAT is this in reguard too?
On Thu, Aug 28, 2008 at 12:56 PM, Ajay ohri [EMAIL PROTECTED] wrote:
For the record,
I* *
**
*am not and have never been an employee of World Programming Ltd and that
the postings and views expressed in these communities and forums have been
motivated by my
Other people have explained that the issue is missing data. I just wanted
to note that the reason for using only the complete cases on all variables
is that svymeans() computes the covariance matrix of all the means, and
this can't really be done sensibly when the means are based on
On Thu, 28 Aug 2008, Chris Oldmeadow wrote:
Hi all,
I have some rough code to sample consecutive integers with length according
to a vector of lengths
#sample space (representing positions)
pos-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
#sample lengths
lengths-c(2,3,2)
From
Why does:
(shape/scale) * (1:365/scale)^(shape - 1)
return a vector of numbers but calling a function
hasard(1:365,shape,scale)
defined like:
hazard - function(x,shape,scale)
{
return (shape/scale) * (x/scale)^(shape - 1)
}
Only return a single value? It is like x becomes a single value
On Mon, 25 Aug 2008, Farley, Robert wrote:
I see a number of things that bother me.
1) str(ByEBNum$StnTraveld) says int [1:12] 1 2 3 4 5 6 7 8 9 10 ...
Even though StnTraveld - c(as.factor(1:12))
You don't want the c()
a-as.factor(1:12)
str(a)
Factor w/ 12 levels 1,2,3,4,..: 1 2
Try
hazard - function(x,shape,scale)
{
return ((shape/scale) * (x/scale)^(shape - 1))
}
hazard(1:365,1,1)
--jeff
[EMAIL PROTECTED] wrote:
Why does:
(shape/scale) * (1:365/scale)^(shape - 1)
return a vector of numbers but calling a function
hasard(1:365,shape,scale)
defined like:
hazard
2008/8/28 [EMAIL PROTECTED]:
hazard - function(x,shape,scale)
{
return (shape/scale) * (x/scale)^(shape - 1)
}
Only return a single value? It is like x becomes a single value passed as an
argument.
It's evaluating return(shape/scale) and returning that! Add some
extra parentheses:
[EMAIL PROTECTED] wrote:
Why does:
(shape/scale) * (1:365/scale)^(shape - 1)
return a vector of numbers but calling a function
hasard(1:365,shape,scale)
defined like:
hazard - function(x,shape,scale)
{
return (shape/scale) * (x/scale)^(shape - 1)
}
Only return a single value? It is like
rkevinburton at charter.net writes:
Why does:
(shape/scale) * (1:365/scale)^(shape - 1)
return a vector of numbers but calling a function
hasard(1:365,shape,scale)
defined like:
hazard - function(x,shape,scale)
{
return (shape/scale) * (x/scale)^(shape - 1)
}
Only
On Thu, 28 Aug 2008, [EMAIL PROTECTED] wrote:
Why does:
(shape/scale) * (1:365/scale)^(shape - 1)
return a vector of numbers but calling a function
hasard(1:365,shape,scale)
defined like:
hazard - function(x,shape,scale)
{
return (shape/scale) * (x/scale)^(shape - 1)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, August 28, 2008 11:36 AM
To: r-help@r-project.org
Subject: [R] Function not returning a vector?
Why does:
(shape/scale) * (1:365/scale)^(shape - 1)
return a
Is there an R function to generate a radar or spider graph from a table
- e.g.radar(table(x)) or some such?
==
Isaac T. Van Patten, Ph.D.
Professor
Department of Criminal Justice
Box 6934, Radford University
Radford, VA 24142
help.search(radar)
and
help.search(spider)
would both get you right to
stars()
Sarah
On Thu, Aug 28, 2008 at 3:00 PM, Van Patten, Isaac T
[EMAIL PROTECTED] wrote:
Is there an R function to generate a radar or spider graph from a table
- e.g.radar(table(x)) or some such?
--
Sarah Goslee
On Thu, Aug 28, 2008 at 10:42 AM, stephen sefick [EMAIL PROTECTED] wrote:
WHAT is this in reguard too?
It seems to be a message from another universe (SAS something) -
maybe a wormhole? Are we not alone?
/H
On Thu, Aug 28, 2008 at 12:56 PM, Ajay ohri [EMAIL PROTECTED] wrote:
For the
Witness this oddity (to me):
rainbow_hcl(10)[1]
[1] #E18E9E
d - attributes(hex2RGB(rainbow_hcl(10)))$coords[1,]
rgb(d[1], d[2], d[3])
[1] #C54D5F
What happened? FYI, this came up as I'm trying to reuse the RGB values I
get from rainbow_hcl in a call to rgb() where I can also set alpha
On Thu, Aug 28, 2008 at 3:07 AM, Giovanni Tarquinio
[EMAIL PROTECTED] wrote:
Hello,
I'm Giovanni from ROMA..
I can't find a solution for the error:
error using packet 1
the y field is not specified and it has not a default value
(this is my traslation from italian language)
The code is:
Hi,
Is there any way to suppress plotting of panels that don't actually contain
any information? I have tried using 'drop.unused.levels=TRUE', but there
doesn't seem to be any effect. Here is an example:
library(lattice)
# some fake data:
d - data.frame(x=runif(20), x.class=rep(letters[1:5],
Folks,
I've been running into an odd situation that occurs when I use length()
function with aggregate(), but not with either one separately. Together,
the results looks correct but is given an unexpected name. 'if
(stringsAsFactors) factor(x) else x' instead of just 'x'.
# Numbers work ok
On Thu, Aug 28, 2008 at 1:07 PM, Aaron Mackey [EMAIL PROTECTED] wrote:
Witness this oddity (to me):
rainbow_hcl(10)[1]
[1] #E18E9E
d - attributes(hex2RGB(rainbow_hcl(10)))$coords[1,]
rgb(d[1], d[2], d[3])
[1] #C54D5F
What happened? FYI, this came up as I'm trying to reuse the RGB values
Please, I seek expertise and advice, possibly leads to R packages or
stats literature.
My data: measurements of economic variables for each county of
California over 37 years.
My dependent variable is square feet of office floor space permitted to
be added in a county.
Independent variables
On Thu, Aug 28, 2008 at 1:21 PM, Dylan Beaudette
[EMAIL PROTECTED] wrote:
Hi,
Is there any way to suppress plotting of panels that don't actually contain
any information? I have tried using 'drop.unused.levels=TRUE', but there
doesn't seem to be any effect. Here is an example:
One option is use this:
aggregate(list(t=tt$t), list(idx=tt$idx), length)
On Thu, Aug 28, 2008 at 4:36 PM, [EMAIL PROTECTED] wrote:
Folks,
I've been running into an odd situation that occurs when I use length()
function with aggregate(), but not with either one separately. Together,
the
On Thursday 28 August 2008, Deepayan Sarkar wrote:
On Thu, Aug 28, 2008 at 1:21 PM, Dylan Beaudette
[EMAIL PROTECTED] wrote:
Hi,
Is there any way to suppress plotting of panels that don't actually
contain any information? I have tried using 'drop.unused.levels=TRUE',
but there doesn't
That's a great work around, as I can eliminate renaming the results column
from 'x' to whatever. Thanks for the quick tip, Henrique.
On the other hand, I'm still stumped as to why aggregate() would name an
output column as 'if (stringsAsFactors) factor(x) else x'. That sort of
behaviour
Duncan,
Thank you for the examples. I had tried all of these different options
for authentication but had no luck. I was getting a 100 continue and
then a 401 unauthorized response. This morning the owners of the
server I was trying to access discovered a bug with their api when using
Hi everyone, I have a quick and probably easy question about lme for this
list.
Say, for instance you want to model growth in pituitary distance as a
function of age in the Orthodont dataset.
fm1 = lme(distance ~ I(age-8), random = ~ 1 + I(age-8) | Subject, data =
Orthodont)
You notice that
mac osx 10.5.4
R 2.7.1
I have fit a model
d-lm(y~x)
with an R^2 of 0.963
but when I issue the command
abline(d)
the line is below where it ought to be. Looks like the right slope,
but not the right intercept.
thanks
--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy
sorry idiotic question- you have to make sure you are using the right
things before you start ploting
On Thu, Aug 28, 2008 at 7:54 PM, stephen sefick [EMAIL PROTECTED] wrote:
mac osx 10.5.4
R 2.7.1
I have fit a model
d-lm(y~x)
with an R^2 of 0.963
but when I issue the command
abline(d)
Charles C. Berry wrote:
On Thu, 28 Aug 2008, Chris Oldmeadow wrote:
Hi all,
I have some rough code to sample consecutive integers with length
according to a vector of lengths
#sample space (representing positions)
pos-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
#sample lengths
Valerie Obenchain wrote:
Duncan,
Thank you for the examples. I had tried all of these different options
for authentication but had no luck. I was getting a 100 continue and
then a 401 unauthorized response. This morning the owners of the
server I was trying to access discovered a bug
Hello
R is pretty new to me. I need to write a function that returns three
matrices of different dimensions. In addition, I need to call a function
from a contributed package with the function. I have browsed several
manuals and docs but the examples on them are either very simple or
I'm feeling like I just don't get it. My attempt at rake now fails
with:
Error in postStratify.survey.design(design, strata[[i]],
population.margins[[i]], :
Stratifying variables don't match
The factors in the data frame looks fine. Should I have the same
structure in the design?
Hi,
when I pick out one element from a matrix, the attribute name is kept, but when
more than one elements are extracted, the attribute name lost;
a-matrix(c(1,2,3,11,12,13,45,56,76),ncol=3,dimnames=list(c(),c(c1,c2,c3)))
k-a[a[,c3]50,c3]
kk-a[a[,c3]60,c3]
attributes(k)
NULL
attributes(kk)
On Thu, 28 Aug 2008, Yuan Jian wrote:
Hi,
when I pick out one element from a matrix, the attribute name is kept, but when
more than one elements are extracted, the attribute name lost;
To what attribute 'name' do you refer?
I only see 'dim' and 'dimnames' attributes:
attributes(a)
$dim
Eduardo M. A. M.Mendes emammendes at gmail.com writes:
R is pretty new to me. I need to write a function that returns three
matrices of different dimensions. In addition, I need to call a function
from a contributed package with the function. I have browsed several
manuals and docs but the
Hi Ed,
Here's a simple example showing your needs:
myfun - function(n1, n2, n3) {
mat1 - matrix(rep(1), nrow = n1, ncol = 3)
mat2 - matrix(rep(2), nrow = n2, ncol = 4)
mat3 - matrix(rep(3), nrow = n3, ncol = 5)
require(survival) ## make sure the package you need is loaded
mypkgfun
HI,
I would like to extract the variance components estimation in lme function
like
a.fit-lme(distance~age, data=aaa, random=~day/subject)
There should be three variances \sigma_day, \sigma_{day %in% subject } and
\sigma_e.
I can extract the \sigma_e using something like a.fit$var. However, I
1 - 100 of 103 matches
Mail list logo