Can we download data of Reuters from R? Just like we have RBloomberg, do
we have something like RReuters? Is this under the developing stage?
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
John Mason wrote:
I have downloaded the latest version of R and continue to have the same
problem I did with the previuos version which is that I am unable to run a
two-sample t-test in R-commander. I can run a paired t-test and a one sample
t-test but not a two-sample t-test or one factor
I don't see the problem with the following... the citations and
baseball data work fine, but my simulated data seems to give
BTm a headache. What am I missing?
---
library(BradleyTerry)
library(doBy)
ng - 100
players - factor( sort( c( jeff, mike, paul, rich ) ) )
np - length( players )
p1 -
The iPlots package provides interactive graphics. One way to to what
you want to do would be to create a variable with all values and a
second binary variable recording which are the 16 special cases.
Draw an interactive histogram of the first with ihist and an
interactive barchart of
Dear R People:
I am getting some odd results when using logical operators:
x - seq(from=-1,to=1,by=0.1)
x
[1] -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4
[16] 0.5 0.6 0.7 0.8 0.9 1.0
x == -1
[1] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
Erin Hodgess wrote:
Dear R People:
I am getting some odd results when using logical operators:
x - seq(from=-1,to=1,by=0.1)
x
[1] -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3
0.4
[16] 0.5 0.6 0.7 0.8 0.9 1.0
x == -1
[1] TRUE FALSE FALSE FALSE
I'm running a vector-time series model with the vars package. When I
test the univariate and multivariate normality of the residuals using
normality(), I get the results, but also this warning
Warning messages:
1: longer object length
is not a multiple of shorter object length in: b2
I used the nlrq function in the package quantreg. There is a lambda in
the output when I set trace=TRUE.
With different start point, the results are converged, but the last
lambda is different.
I want to know the meaning lambda=1 and lambda=0.
Many Thanks!
Examples of output
1. Where the last
Hi Shubha,
There is no reuter link in R. It does not exist in Splus either nor in matlab.
Apparently this is a legal type of issue from reuter who is keeping its data
proprietary.
AA.
- Original Message
From: Shubha Vishwanath Karanth [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent:
The rpart function allows one to give the cross-validation groups explicitly.
So if the number of observations was 10, you could use
rpart( y ~ x1 + x2, data=mydata, xval=c(1,1,2,2,3,3,1,3,2,1))
which causes observations 1,2,7, and 10 to be left out of the first xval
sample, 3,4, and 9 out
On Loops:
The apply coomands are better, faster than loops. If there are lots
of loops or nested loops then you should be able to replace some of the
loops with an apply command. If you have nested loops I'd recommend
replacing loops on the inside first.
R seems better designed using the apply
Hi!
I have problems with the function arima(), it takes too much time to run
(15 minuts) it is normal?
for example I put:
a-arima(d7,c(0,0,5),seasonal=list(order=c(0,1,2),period=7))
where d7 is a daily time serie with 3600 observations
Are there another function to modelize 2 seasonalities
This is FAQ 7.31 in the R FAQ.
Basically computers in general have problems exactly representing all
but a few floating point numbers, so while 2 numbers may look the same
when displayed (rounded to a couple of digits), they are different if
you look at them in full precision due to different
Why? And how to solve it? The code and result are following,
data=rnorm(50)
kde=density(data,n=20,from=-1,to=10)
kde$x;kde$y
[1] -1.000 -0.4210526 0.1578947 0.7368421 1.3157895 1.8947368
[7] 2.4736842 3.0526316 3.6315789 4.2105263 4.7894737 5.3684211
[13] 5.9473684
I am working with a dataset where there are 5 possible outcomes (coded 1:5),
I would like to create 5 categorical variables (event1...event5). I am using
a for loop an if statements, but I have a large dataset( approx 100,000
rows) it takes quite a bit of time, is there a way to speed this up?
sj wrote:
I am working with a dataset where there are 5 possible outcomes (coded 1:5),
I would like to create 5 categorical variables (event1...event5). I am using
a for loop an if statements, but I have a large dataset( approx 100,000
rows) it takes quite a bit of time, is there a way to
## The main reason for wanting such a coding is to use it in
## a linear model. Therefore, declare the variable to be a factor
## and use it directly.
tmp - sample(1:5, 40, replace=TRUE)
tmpf - factor(tmp)
tmp.y - rnorm(40)
tmp.aov - aov(tmp.y ~ tmpf)
summary(tmp.aov)
contrasts(tmpf)
try this:
test2 - rep(seq(1:5),2000)
#setup a data frame and index into the columns
result - data.frame(event1=rep(0,length(test2)),
event2=rep(0,length(test2)),
+ event3=rep(0,length(test2)), event4=rep(0,length(test2)),
event5=rep(0,length(test2)))
for (i in seq(ncol(result))){
+
Hi,
I am really new at R. Does anyone know what is the real difference of
vector and array, except that many operations that expect an array does
not work on a vector?
Thanks,
Geoffrey
___=0A=
=0A=
=0A=
The information in this email or in any
As Richard has already pointed out you may only need to convert your
numeric vector to a factor but just in case here are a few direct answers:
Using X from Chuck's post here are two ways of creating a 100x5
matrix of indicator variables:
model.matrix(~ X-1, list(X = factor(X)))
outer(X, 1:5,
Wensui Liu [EMAIL PROTECTED] wrote:
Right now, I am using SAS and S+/R. As a new year resolution, I am
planning to learn a scripting language.
from statisticians' point of view, which scripting language is worth
to learn, perl, python, or any other recommendation? (Most likely, I
will be
On Dec 29, 2006, at 2:16 PM, Geoffrey Zhu wrote:
Does anyone know what is the real difference of vector and array?
# Here's a vector:
letv - letters
is.vector(letv)
# Here's an array:
leta - as.array(letters)
is.array(leta)
attributes(letv)
attributes(leta)
To understand the importance of
Hi.
I am using R 2.3.1 on Windows XP. I had installed a library package into my
first session and wanted the same package in my second session, so I went
out to the CRAN mirror and tried to install the package, and got the
following message:
Hi,
I installed R-2.4.0 and R-2.4.1 on linux redhat (RHEL 3.0), and am
encountering the following messages below. I searched the R FAQs and over
the net, but couldn't find helpful information.
When I check-all I do see some diff's (e.g., for stats, nls.Rout and
nls.Rout.save in
Halim Damerdji wrote:
Hi,
I installed R-2.4.0 and R-2.4.1 on linux redhat (RHEL 3.0), and am
encountering the following messages below. I searched the R FAQs and over
the net, but couldn't find helpful information.
When I check-all I do see some diff's (e.g., for stats, nls.Rout and
I had had problems getting my head around what an array was as opposed to a
data frame and where vectors fitted into the two.
I found a useful URL on the same website eluded to below.
http://www.burns-stat.com/pages/Tutor/unwilling_S.pdf
Go to the heading The Look and Feel of Objects
Farrel
You can only expect that update / reinstall a ***package*** works if you
have not yet loaded it into your R session.
Hence close R, start it without loading the relevant package and then
update/reinstall.
Best,
Uwe Ligges
Talbot Katz wrote:
Hi.
I am using R 2.3.1 on Windows XP. I had
I am fitting a coxph model on a large dataset (approx 100,000 patients), and
then trying to estimate the survival curves for several new patients based
on the coxph object using survfit. When I run coxph I get the coxph object
back fairly quickly however when I try to run survfit it does not
Hi Uwe.
Thank you so much for responding! I guess I wasn't entirely clear about the
problem. If I make the mistake of trying to install a package from CRAN in
a second session after I've already installed it in a previous session, it
won't install in the second session, and even if I close
On Fri, 29 Dec 2006, sj wrote:
I am working with a dataset where there are 5 possible outcomes (coded 1:5),
I would like to create 5 categorical variables (event1...event5). I am using
a for loop an if statements, but I have a large dataset( approx 100,000
rows) it takes quite a bit of time,
Hi Erin,
You would be safe on a machine that represented floating point numbers
in base 10, and I haven't seen one of those for such a long time... All
modern machines use base 2 for floating point numbers.
The moral of the story is not to believe what you see printed. The
number you see
Hi,
it sounds like you mixing up the words install and load.
Basically, you only have to *install* a package once on your computer,
but have to load it for every R session which you are going to use it
in.
So, in your case install it once, using either
install.packages(corpcor)
or the
Hi Uwe,
Thank you very much for the hint. I had a .Renviron in my home directory
pointing to my 2.0.1 version. After removing that file, everything worked
fine.
Thanks again! Happy new year.
Best regards,
-Halim
On 12/29/06, Uwe Ligges [EMAIL PROTECTED] wrote:
Halim Damerdji wrote:
Hi,
Hi,
How can we set the environment for the minuslog function in mle()? The
call in this code fails because the ll function cannot find the object
'y'. Modifying from the example in ?mle:
library(stats4)
ll - function(ymax=15, xhalf=6) {
-sum(stats::dpois(y, lambda=ymax/(1+x/xhalf),
Add the line marked ### so that the environment of loglik.fun is reset to
the environment within fit.mle so that it can find y there:
library(stats4)
ll - function(ymax=15, xhalf=6) {
-sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
}
fit.mle - function(FUN, x, y) {
loglik.fun -
On Fri, 29 Dec 2006, Uwe Ligges wrote:
You can only expect that update / reinstall a ***package*** works if you
have not yet loaded it into your R session.
Hence close R, start it without loading the relevant package and then
update/reinstall.
And for the record, this is answered in rw-FAQ
On Fri, 29 Dec 2006, Sebastian P. Luque wrote:
Hi,
How can we set the environment for the minuslog function in mle()? The
call in this code fails because the ll function cannot find the object
'y'. Modifying from the example in ?mle:
library(stats4)
ll - function(ymax=15, xhalf=6) {
Hi.
On 12/30/06, Bhanu Kalyan.K [EMAIL PROTECTED] wrote:
Dear Mr.Bengtsson,
The steps you have suggested are working for single lines of matlab
statements. But, as i mentioned earlier, If i want to see the output of an
entire matlab code (say swissroll.m) then you suggested me to do
res -
38 matches
Mail list logo