Displaying 20 results from an estimated 10000 matches similar to: "Include manually an intercept in lm without breaking it?"
2009 Nov 29
1
lm: eval(parse(text=)) works on one side y/x but not on both?
Hi
My goal is to do a (multiple) regression, just knowing that my Y
variables will be the say k first variables of a matrix/data frame. I
thought I should do it with eval(parse)) but encounter a strange problem.
See:
lm(y~.-y, data=freeny) #that's what I want to do in the one equation case
#Problem is I don't know name of the variable... only that it is the
first one...
#so idea is to
2008 Mar 03
1
How to include an externally defined NULL value in lm
Hello!
I would love to be able to include an external variable to a lm call, I
mean something:
if(TRUE)
a<-freeny.x[,4]
else
a<-NULL
lm(freeny.y~freeny.x[,-4] +a)
but it does not work with a<-NULL, whereas
lm(freeny.y~freeny.x[,-4] +NULL)
I don't understand why and did not find an answer in the manuals... do
you see it? Any idea?
Thanks!!
2010 Sep 04
1
tail.matrix returns matrix, while tail.mts return vector
Hi
I have a few problems with tail/head when applied to multiple time
series. I'm not sure as whether I did not understand the function or
whether it correspond to an unexpected behavior.
When head(a,n) is applied on data.frame or matrix, it returns a
data-frame or matrix with first n obs of *each* variable. When applied
to a mts object, it returns first n obs of *first* variable only,
2009 Mar 04
2
R CMD check detects parse error, but in which file?
Hello
I looked on the archives but did not find answer for that...
Running R CMD check for a package, i get an error:
Error in parse(n = -1, file = file) : unexpected symbol at
3341: }
But how can I find which file is guilty? What is this 3342 referring to?
Finally the solution I found is to source() every file until I find the
file where the problem is... Is there some better way to do it?
2009 Nov 29
4
lm() notation question
Hi,
A recent thread provided a (working) construct for lm:
lm(as.matrix(freeny[ix]) ~., freeny[-ix])
Can someone explain what is meant by the formula in that expression,
that is, what does "mymatrix~." do? I couldn't find any such example
in the lm() or formula() help pages.
thanks
Carl
2009 Nov 25
1
rattle(): unable to load shared library
Hi
I'm trying to install the rattle GUI on winwos 2000, with last version R 2.10.
I had a first problem using the rattle package, as it was asking pkg
XMl, which is no more in the CRAN repo. I instead simply install in
R/libraries the XML pkg from:
http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.10/
Maybe I mised something here... So now I was able to run the library(rattle)
then,
2008 Nov 06
1
FW: [rkward-devel] questions on RKWard
Thought I should copy the list with Matthieu's response.
H
-----Original Message-----
From: Matthieu Stigler [mailto:matthieu.stigler at gmail.com]
Sent: Wednesday, November 05, 2008 8:29 PM
To: Horace Tso; rkward-devel at lists.sourceforge.net
Subject: Re: [rkward-devel] questions on RKWard
some answer only for the third question: do you have the package
r-doc-html installed? (on ubuntu
2008 Dec 18
1
Indicator function for merged times (was: Re: Rr: For and if confusion)
Please start a new thread for a new topic and use a
meaningful subject for sake of the archives and
everyone trying to follow.
Using your Int1, correcting your Int2 and using your
Y (which goes to Jul not Aug as per the comment):
library(zoo)
> as.ts(with(merge.zoo(Int1, Int2, Y, fill = 0), pmax(Int1, Int2)))
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1992
2008 Apr 17
1
Suggestion: add a warning in the help-file of unique()
Hello
I'm sorry if this suggestion/correction was already made but after a
search in devel list I did not find any mention of it.
I would just suggest to add a warning or an exemple for the help-file of
the function unique() like
"Note that unique() compares only identical values. Values which, are
printed equally but in facts are not identical will be treated as
different."
2018 Mar 05
1
model.frame strips class as promised, but fails to strip OBJECT in C
Full thread here:
https://github.com/tidyverse/broom/issues/287
Reproducible example:
is.object(freeny$y)
# [1] TRUE
attr(freeny$y, 'class')
# [1] "ts"
class(freeny$y)
# [1] "ts"
# ts attribute wiped by model.frame
class(model.frame(y ~ ., data = freeny)$y)
# [1] "numeric"
attr(model.frame(y ~ ., data = freeny)$y, 'class')
# NULL
# but still:
2011 Apr 13
3
R plots pdf() does not allow spotcolors?
Hi
We are about to publish a book, which contains figures made with R
plots. An important detail that we did not take into account is that the
book will not be printed in 4 colors (cmyk mode), but only 2 (black
+"spotcolor"). The spotcolor we use is part of the big Pantone family.
The problem is that both pdf() and postscript() offer either rgb or
cmyk, but no spotcolors such as
1999 Feb 18
1
model.frame mangles time series (PR#121)
This one showed up while looking at one of Ripley's other reports:
> data(freeny)
> model.frame(y~1,data=freeny,subset=1:10)
y
1962.25 8.79236
1962.5 8.79137
1962.75 8.81486
1963 8.81301
1963.25 8.90751
1963.5 8.93673
1963.75 8.96161
1964 8.96044
1964.25 9.00868
1964.5 9.03049
> model.frame(y~1,data=freeny,subset=1:10)$y
Warning: Replacement length not a
2011 Jan 24
3
error with source(): invalid 'times' value
hi
I am seeing a strange behavior I can't understand... doing:
> source("/tmp/RFile.r",echo=TRUE)
Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - :
invalid 'times' value
> traceback()
3: rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) -
leading))
2: paste(rep.int(c(prompt.echo, continue.echo), c(leading, length(dep)
2013 May 20
1
R CMD check: unknown option ‘--outdir==RCHECK’
Dear R devel
I am experiencing a problem using R CMD check. I tried to specify the
argument outdir, but get every time the error message:
Warning: unknown option ‘--outdir==RCHECK’
This happens both on R 2.15.2 Linux, as well as R 3.0.1 Windows, with
latest Rtools. Is it just that I am not passing the argument the right way,
or is there an issue with R CMD check?
I tried to write the argument
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives
demonstrations on what can be done using R? I downloadedR Langauage
definition and An introduction to R but haven't found them overly useful.
I'd really like to be able to follow some tutorials using a dataset or many
datasets. The datasets I have available on R are
Data sets in package 'datasets':
2010 Apr 15
1
Changing locale?
Hi
I need for a specific application to change the locale of R 2.9.2 in
Ubuntu 9.04. Trying the example in ?Sys.setlocale:
Sys.setlocale("LC_TIME", "de_DE.utf8")
[1] ""
Warning message:
In Sys.setlocale("LC_TIME", "de_DE.utf8") :
la requ?te OS pour sp?cifier la localisation ? "de_DE.utf8" n'a pas pu
?tre honor?e
I tried the code
2008 Nov 15
2
Update to 2.8 and problem with liblapack
Hello
To update from R 2.6 to 2.8 (on Ubuntu 8.04 both) I had to install new
tcl and liblapack packages (excuse me it is in french):
> sudo apt-get install r-base-dev
> Lecture des listes de paquets... Fait
> Construction de l'arbre des d?pendances
> Lecture des informations d'?tat... Fait
> Les paquets suppl?mentaires suivants seront install?s :
>
2012 Mar 29
2
What is 'freeny.x' object?
Dear all, I have discovered an object named 'freeny.x' which seems
in-built. Can somebody tell me why it is there and what purpose it is
serving?
'ls()' syntax does not seem to catch this object in the environment.
Thanks,
2011 Aug 16
3
invalid multibyte string at '<a0>'
Hi
I have a problem reading files from Windows... these files have, instead
of NA on last column. special ending '<a0>' which makes problem... This
problem does not appear while reading the same file in Windows!
Try:
read.csv("http://dl.dropbox.com/u/6113358/prob.csv")
Could you please tell me if you also have this problem? I have tried
either by cleaning the file on
2010 Nov 15
2
How to move an internal function to external keeping same environment?
Hi
I have within a quite big function foo1, an internal function foo2. Now,
in order to have a cleaner code, I wish to have the internal foo2 as
"external". This foo2 was using arguments within the foo1 environment
that were not declared as inputs of foo2, which works as long as foo2 is
within foo1, but not anymore if foo2 is external, as is the case now.
Now, I could add all those