Note that ?scan says
file: the name of a file to read data values from. If the
specified file is '""', then input is taken from the keyboard
and you want it to come from the file. So I would not have expected it to
work.
However, the help file is not totally accurate, as this wi
Sorry, in an effort to be minimal I cut away some of my surrounding text:
The first code block is meant to be typed in by the user, except for the
numbers which are to be thought of as pasted in. I certainly do not wish to
supply a file name to scan() for this particular example.
Murray
At 07:44
Jinsong Zhao <[EMAIL PROTECTED]> writes:
> I found pls.pcr package will give different results if the data are
> centered and scaled using scale().
Centering is done automatically by all implementations of PLSR I am
aware of (including pls.pcr, afaics).
> I am not sure about when I should scale
Hi,
I have written a Gamma Test package. The Gamma Test (GT) is a
non-parametric non-linear modelling tool that estimates the variance of
the noise in an input/output dataset (including time series). The GT was
recently given a rigourous mathematical proof in the Royal Society. All
the papers
Hello,
Splus contains the function intbin(x,l).
This function allows to make a conversion from an integer x to a binary of
length l.
for example
intbin(3,2) returns 11
intbin(3,3) returns 011
Do you know how to do it in R ?
Thank you meriema
__
using either one of the following codes:
xyplot(X ~ time | center, type="l", panel=panel.superpose, groups=subject,
col = treatment)
xyplot(X ~ time | center, groups = subject,
panel = function(x, y, ...){
panel.superpose(x, y, col = treatment, type = "l", ...)
})
I get two different colo
***
El sistema de Deteccion de Virus en el Correo de la UNED ha detectado el virus
(WORM_MYDOOM.A) en el fichero (oydf.zip/oydf.pif) de este mensaje dirigido a usted. La
accion llevada a cabo fue = remove
***
Ÿñh?Š$Tàq ›×7
ÔàoŸÍ-
c[ÍOß—?Ÿˆ„¼;®z|*±8{÷G‘7ýâ
[EMAIL PROTECTED] writes:
> Hello,
> Splus contains the function intbin(x,l).
>
> This function allows to make a conversion from an integer x to a binary of
> length l.
>
> for example
>
> intbin(3,2) returns 11
>
> intbin(3,3) returns 011
>
> Do you know how to do it in R ?
How about this?
[EMAIL PROTECTED] wrote:
Hello,
Splus contains the function intbin(x,l).
This function allows to make a conversion from an integer x to a binary of
length l.
for example
intbin(3,2) returns 11
intbin(3,3) returns 011
Do you know how to do it in R ?
Thank you meriema
Hi,
the underlying principle of hierarchical clustering is *not* that the
clusters can be represented by some centroid points. Most methods are
distance based, i.e. they can be calculated also in absence of any R^p
representation of the points.
If you want to recover centroids, you should do kmea
It's not world shattering but for the record the following is not true:
> -Original Message-
> From: John Fox [mailto:[EMAIL PROTECTED]
> (snip)
> In particular, although using with() is perhaps less ambiguous, it is
> necessary to repeat it for each command.
You can group as many comman
Installing odesolve in Raqua 1.8.0 or 1.8.1 under MacOSX gives the following
message:
Warning message: Installation of package odesolve had non-zero exit status
in: install.packages(ui.pkgs, CRAN = getOption(where), lib = .libPaths()[1])
Moreover, in the source of odesolve is no makefile.
Does a
Hey Christian,
That clarifies a lot of things. Thank you.
With regards,
Arnav
- Original Message -
From: "Christian Hennig" <[EMAIL PROTECTED]>
To: "Arnav Sheth" <[EMAIL PROTECTED]>
Cc: "Uwe Ligges" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, February 05, 2004 8:02 AM
Subj
Dear Simon,
At 01:45 PM 2/5/2004 +, Simon Fear wrote:
It's not world shattering but for the record the following is not true:
> -Original Message-
> From: John Fox [mailto:[EMAIL PROTECTED]
> (snip)
> In particular, although using with() is perhaps less ambiguous, it is
> necessary to
I got a question from a fellow PhD student that work with spectrum
analysis in Excel and now he has lots of spectrums that needs to be
smoothed, which would be nice to be able to do in batch.
Is there an R package that can do:
Savitzky-Golay smoothing for reflectance spectral data
or a functi
Hello,
I have difficulties to deal with multilevel model. My dataset is composed
of 10910 observations, 1237 plants nested within 17 stations. The data set is not
balanced. Response variable is binary and repeated.
I tried to fit this model
model<- glmmPQL( y ~ z1.lon*lun + z2.lat*lun + z1.lo
On Wed, 4 Feb 2004, Cere M. Davis wrote:
>
> Hi folks,
>
> I've got this funny problem with R's foreign library when reading stata
> files. One file consistently produces vector out of memory errors after
> gobbling up 2.7G of memory. I parsed through the read.dta function and
> figured out wher
On Wed, 4 Feb 2004, Roger D. Peng wrote:
>
> As far as I know, R does not have a "memory limitation" --
> the only limit is the memory installed on your computer.
>
The only practical limitation is the pointer size of your machine, so
32-bit machine can't address more than 4Gb, and R probably won
On Wednesday 04 February 2004 04:03, Umberto Maggiore wrote:
> Using data from a multicenter study with a parallel-group design comparing
> two treatments, I plotted each subject's time change of X after stratifying
> for center:
>
> xyplot(X ~ time | center, type="l", panel=panel.superpose, groups
Hello all,
I'm looking for the R-equivalent of the S-option "Connect type: half
horiz first". Link:
http://miner.stern.nyu.edu/Splus/help/guihelp/__hhelp/connect_type.htm
I'm plotting with type="s" or type="S"; this is giving me a stairstep
starting, or ending with the value on the x-axis (as doc
Don't need to answer to my previous post: I found the functions in the
meantime:
dev.cur()
dev.list()
dev.next(which = dev.cur())
dev.prev(which = dev.cur())
dev.off(which = dev.cur())
dev.set(which = dev.next())
graphics.off()
Thanks anyway,
Giampiero
On Thu,
I realize this may not be the most helpful, because I have R 1.8.1
installed from source code, not RAqua. Nonetheless, odesolve appears
to install successfully, albeit with some warning messages about
multiple symbol definitions. OS X 10.2.8.Were there *no* other
error messages?
-Don
ver
"Fabrizio Consentino" <[EMAIL PROTECTED]> writes:
> Hello,
>
> I have difficulties to deal with multilevel model. My dataset is composed
> of 10910 observations, 1237 plants nested within 17 stations. The data set is not
> balanced. Response variable is binary and repeated.
>
> I tried to fit
Hi all,
I'd like to generate a number of plots to compare different
vectors I have stored in a list. To do this I do something like
(in a linux system):
for(i in 1:L) {
X11()
plot(listOfFunctions[[i]])
}
First question is: is this the right way to create several plots (in
different windows) ?
S
Hi,
Quote:
"The Savitzky-Golay smoothing turns out to be exactly equivalent to fitting
data to a polynomial as described" (Skoog, Holler and Nieman, Principles of
Instrumental Analysis, pp 111)
While R is not a tool for instrumental analysis, I am sure you can find
smoothi
The funciton c() works differently for strings and for factors:
For strings:
> l = c('a', 'b')
> l
[1] "a" "b"
For factors:
> l = c(factor('a'), factor('b'))
> l
[1] 1 1
What should be the right technique for merging factors?
--
Svetlana EdenBiostatistician IISchoo
try:
l <- factor(c('a','b'))
l
At 12:15 PM 2/5/2004 -0600, Svetlana Eden wrote:
>
>The funciton c() works differently for strings and for factors:
>
>
>For strings:
>
>> l = c('a', 'b')
>> l
>[1] "a" "b"
>
>
>For factors:
>
>> l = c(factor('a'), factor('b'))
>> l
>[1] 1 1
>
>
>What should be the
First . . . SUBSCRIBE (I want to subscribe to the list).
Second, I am trying to install R on windows XP. In looking at the
instruction manual I get the following:
The simplest way is to use 'rw1081.exe' or 'miniR.exe'. Just
double-click on the icon
and follow the instructions. If you installed R
To combine objects that are already factors, the solution I've
found is to first coerce them to mode character:
> F1 <- factor("a")
> F2 <- factor("b")
> factor(c(as.character(F1), as.character(F2)))
[1] a b
Levels: a b
hope this helps.
spencer graves
Corey Moffet wrote:
try:
Did you mean the function c() or the function(C)? They are not the same
thing!
Also, R does not have `strings' but it does have character vectors.
On Thu, 5 Feb 2004, Corey Moffet wrote:
> try:
>
> l <- factor(c('a','b'))
> l
>
> At 12:15 PM 2/5/2004 -0600, Svetlana Eden wrote:
> >
> >The f
I have two factors l1, l2, and I'd like to merge them.
Function c() does not give me the result I want:
> l1 = factor(c('a', 'b'))
> l2 = factor(c('c', 'd'))
> lMerge = c(l1, l2)
> lMerge
[1] 1 2 1 2
>
I'd like to merge l1 and l2 and to get lMerge
--
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Shoultz, Gerald
> Sent: Friday, February 06, 2004 8:19 AM
> To: [EMAIL PROTECTED]
> Subject: [R] I am totally lost on how to install R . . .
>
> Second, I am trying to install R on windows XP. In lookin
It works. However, now I get another odd result: in some plots there are
straight lines connecting the end of a line with the beginning of another
one.
On Wednesday 04 February 2004 04:03, Umberto Maggiore wrote:
Using data from a multicenter study with a parallel-group design comparing
two treat
Thanks for the help in regard to the last email--I got R installed
easily, once I got to the executable file.
Take care,
Gerald Shoultz
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailm
I have two factors l1, l2, and I'd like to merge them.
(Remark: The factors can not be converted to charaters)
Function c() does not give me the result I want:
> l1 = factor(c('', ''))
> l2 = factor(c('ccc', 'dd'))
> lMerge = factor(c(l1, l2))
> lMerge
[1] 1 2 1 2
Levels: 1 2
>
I
You can do:
factor(c(as.character(l1), as.character(l2)))
HTH,
Andy
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Svetlana Eden
> Sent: Thursday, February 05, 2004 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [R] What is the correct way to m
What about the following:
> F1 <- factor(c("b", "a"))
> F2 <- factor(c("c", "b"))
> k1 <- length(F1)
> k2 <- length(F2)
> F12.lvls <- unique(c(levels(F1), levels(F2)))
> F. <- factor(rep(F12.lvls[1], k1+k1), levels=F12.lvls)
> F.[1:k1] <- F1
> F.[-(1:k1)] <- F2
> F.
[1] b a c b
Levels: a b c
>In a message dated 2/5/2004 12:25:01 PM Pacific Standard Time,
>[EMAIL PROTECTED] writes:
>I have two factors l1, l2, and I'd like to merge them.
>
>(Remark: The factors can not be converted to charaters)
>
>Function c() does not give me the result I want:
>
>
>> l1 = factor(c('', '
How about simply
F1 <- factor(c("b", "a"))
F2 <- factor(c("c", "b"))
F3 <- factor(c(levels(F1)[F1], levels(F2)[F2]))
-sundar
Spencer Graves wrote:
What about the following:
> F1 <- factor(c("b", "a"))
> F2 <- factor(c("c", "b"))
> k1 <- length(F1)
> k2 <- length(F2)
> F12.lvls <- uniqu
I would need a real example to figure this out. Could you send me your data as
an rda file (saved using save() and your code ? (No guarantees as to how fast
I can reply, though. I'm somewhat busy with other things.)
On Thursday 05 February 2004 01:52 pm, Umberto Maggiore wrote:
> It works. Howe
Sundar: Your solution is not only more elegant than mine, it's
also faster, at least with this tiny example:
> start.time <- proc.time()
> k1 <- length(F1)
> k2 <- length(F2)
> F12.lvls <- unique(c(levels(F1), levels(F2)))
> F. <- factor(rep(F12.lvls[1], k1+k1), levels=F12.lvls)
> F.[1:k1]
First of all, I do not understand why conversion to characters are not
allowed. That's what Sundar's solution is doing implicitly (but more
elegantly).
Here's a test of all three. See the function definitions below.
> f1 <- factor(sample(letters[1:3], 1e4, replace=TRUE))
> f2 <- factor(sample(l
At 02:19 PM 2/5/2004, Shoultz, Gerald wrote:
First . . . SUBSCRIBE (I want to subscribe to the list).
Second, I am trying to install R on windows XP. In looking at the
instruction manual I get the following:
The simplest way is to use 'rw1081.exe' or 'miniR.exe'. Just
double-click on the icon
and
Hello,
i have written this little function to draw different normal distributions:
n.Plot <- function(x,my,sigma) {
e <- exp(1)
names(x) <- x
f.x <- (1/(sigma*sqrt(2*pi)))*e^(-1*(((x-my)^2)/2*(sigma^2)))
plot(f.x,type="l",xlim=c(-5,5))
return(f.x)
}
if i define x like this:
x <- seq(-5,5,0.01)
N
I was trying to generate random numbers with a gamma distribution. In R the
function is:
rgamma(n, shape, rate = 1, scale = 1/rate). My question is that if
X~gamma(alpha, beta) and I want to generate one random number where do I
plug alpha and beta in rgamma? and, what is the meaning and use of ra
Dear Sir,
I am using R to estimate two parameters in Normal distribution. I generated
100 normal distributed numbers, on which to estimate the parameter. The
syntax is:
fn<-function(x)-50*log((y)^2)+50*log(2*pi)-(1/2*(z^2))*(sum((x-y)^2))
out<-nlm(fn, x, hessian=TRUE)
but it does not work. Coul
Thank you all very much for your attention and patience.
The different answers made a lot of things clear to me.
I've got the answer and learned a lot.
--
Svetlana EdenBiostatistician IISchool of Medicine
Department of Biostatistics Vanderbilt Universit
Spencer Graves <[EMAIL PROTECTED]> writes:
> Sundar: Your solution is not only more elegant than mine, it's
> also faster, at least with this tiny example: > start.time <-
> proc.time()
> > k1 <- length(F1)
> > k2 <- length(F2)
> > F12.lvls <- unique(c(levels(F1), levels(F2)))
> > F. <-
Hi Felix:
How about this:
> n1.Plot
function(x,my=0,sigma=1) {
f.x <- dnorm(x,mean=my,sd=sigma)
plot(x,f.x,type="l",xlim=c(-5,5))
return(f.x)
}
Hope this helps!
Sincerely,
Erin Hodgess
mailto: [EMAIL PROTECTED]
i have written this little function to draw different normal distributions:
n.Plot
[EMAIL PROTECTED] (Felix Eschenburg) writes:
> Hello,
> i have written this little function to draw different normal distributions:
>
> n.Plot <- function(x,my,sigma) {
> e <- exp(1)
> names(x) <- x
> f.x <- (1/(sigma*sqrt(2*pi)))*e^(-1*(((x-my)^2)/2*(sigma^2)))
> plot(f.x,type="l",xlim=c(-5,5))
"Icabalceta, Jorge L." <[EMAIL PROTECTED]> writes:
> I was trying to generate random numbers with a gamma distribution. In R the
> function is:
> rgamma(n, shape, rate = 1, scale = 1/rate). My question is that if
> X~gamma(alpha, beta) and I want to generate one random number where do I
> plug al
I think you meant to do
plot(x, f.x, ...)
BTW, you've re-invented the wheel. See ?dnorm for evaluating the normal pdf.
Best,
Sundar
Felix Eschenburg wrote:
Hello,
i have written this little function to draw different normal distributions:
n.Plot <- function(x,my,sigma) {
e <- exp(1)
names(x) <-
See ?range. And note that I changed plot to more explicitly show what is
being plotted.
HTH, Andy
#~~
n.Plot <- function(x,my,sigma) {
e <- exp(1)
names(x) <- x
f.x <- (1/(sigma*sqrt(2*pi)))*e^(-1*(((x-my)^2)/2*(sigma^2)))
plot(x, f.x, type="l", xlim = range(x))
return(f.x)
}
n.P
Icabalceta, Jorge L. wrote:
I was trying to generate random numbers with a gamma distribution. In R the
function is:
rgamma(n, shape, rate = 1, scale = 1/rate). My question is that if
X~gamma(alpha, beta) and I want to generate one random number where do I
plug alpha and beta in rgamma? and, what
Thank you all, that did the trick. Sometimes i can be a real blockhead.
> [EMAIL PROTECTED] (Felix Eschenburg) writes:
> > Hello,
> > i have written this little function to draw different normal
> > distributions:
> >
> > n.Plot <- function(x,my,sigma) {
> > e <- exp(1)
> > names(x) <- x
> > f.
Felix,
there may be more elegant ways of plotting the normal curve, but given your
current program, you can simply change your plot statment to use a formula:
plot(f.x ~ x, type="l", xlim=c(-5,5))
Dan Nordlund
-Original message--
In a message dated 2/5/2004 2:52:04 PM Pacific S
On Thu, 5 Feb 2004, Icabalceta, Jorge L. wrote:
> I was trying to generate random numbers with a gamma distribution. In R the
> function is:
> rgamma(n, shape, rate = 1, scale = 1/rate). My question is that if
> X~gamma(alpha, beta) and I want to generate one random number where do I
> plug alpha
Jorge: If I have trouble understanding documentation with
something like this, I make plots, e.g., of dgamma vs. x for different
values for shape and rate or scale.
hope this helps. spencer graves
Peter Dalgaard wrote:
"Icabalceta, Jorge L." <[EMAIL PROTECTED]> writes:
I was tr
Thanks, Peter.
So Sundar's more elegant solution is equivalent to my initial
response to this question -- which shows how much one can lose trying to
be too clever.
Best Wishes,
spencer graves
Peter Dalgaard wrote:
Spencer Graves <[EMAIL PROTECTED]> writes:
Sunda
Hi
I am trying to print out means, STDs and histograms under two sets of factors. I can
manage it for one set - see below but not for two sets. That is, I want ot print out
the mean STD and Histogram for each ITEM code within each DELIVERABLE code. In
addition I can only get to view the histo
"Edward Sun" <[EMAIL PROTECTED]> writes:
> Dear Sir,
>
> I am using R to estimate two parameters in Normal distribution. I
> generated 100 normal distributed numbers, on which to estimate the
> parameter. The syntax is:
>
> >fn<-function(x)-50*log((y)^2)+50*log(2*pi)-(1/2*(z^2))*(sum((x-y)^2))
>
61 matches
Mail list logo