return(rval)
}
except that in the example above the critical line does not give
any error, while in the real (much bigger) example it does, for
things like:
test(c(runif(100), 100))
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https
Is there any heteroskedasticity test in the package? Something
that would flag a sample like
x - c(rnorm(1000), rnorm(1000, 0, 1.2))
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
-
dimensions_003f
... and it seems that anything you do to mat should turn it back
into a one-dimensional vector.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
Is there any function that divides a sample into N quantiles?
For example, for N = 2, this would be the solution:
x - rnorm(100)
m - median(x)
q - ifelse(x = median, 1, 2)
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
9 1 11 12 2 8
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
Martin C. Martin wrote:
In the Linux (FC3) version of R, ctrl-\ quits R. This wouldn't be
so bad, but on my keyboard, it's right next to ctrl-p and I tend to
hit it by accident.
And what is the use of ctrl-p?
Alberto Monteiro
__
R-help
doing.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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.
# h(2) = 5
# h(3) = 7
So far, so good. But why:
h
shows:
function(x) f(x+1)-f(x)
environment: 0264BE84
I don't get it. h should show function(x) g(x+1)-g(x)
or something like that.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https
){
date - read.table(bessa.csv,header=T,sep=;,dec=,)
calP - (22000)/(1+exp(-(a*date$v+b)))
err - (calP-date$P)^2
return(sum(err))
}
Try:
date - read.table(bessa.csv,header=T,sep=;,dec=,)
curv - function(a,b){
calP - (22000)/(1+exp(-(a*date$v+b)))
err - (calP-date$P)^2
return(sum(err))
}
Alberto
the pyramid whose
vertices are c(1,0,0,0), c(0,1,0,0), c(0,0,1,0) and
c(0,0,0,1).
I don't know if there is a simple formula to do this
sampling.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
, dimnames=list(c(A,B,C,D),
c(site1,site2,site3,site4,site5, site6,site7)))
t(X) %*% Y will give something; I don't know if this is what
you want.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
this distribution, AFAIK, but I
should have consulted the Borg of All Wisdom, the Wikipedia].
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
I found another method to generate this, in the Borg of all Wisdom:
http://en.wikipedia.org/wiki/Simplex
Alberto Monteiro
---
Section Random Sampling:
The second method [[the first method is based on the Dirichlet
distribution -- avfm]] to generate a random point on the unit
simplex is based
instead of . And drop the second ;.
Also, don't forget that return x is wrong [it took me a long
time to figure out that R != C, and it's just return(x)]
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
) x^i)
f - my_list[[2]]
f(10)
[1] 1e+10
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
, because 1700, 1800 and 1900 were not leap years
And now I think the problem is much simpler.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
* 365 + 100 - 3) * 10e7 # 2001-01-01
x - as.Date(1601-01-01) + win.xp.filetime / 10e7
x
[1] 2001-01-01
This supposes, of course, that Windows is compliant with
the Gregorian Calendar [until a few years ago, Excel did
consider 1900 a leap year, so care must be taken here].
Alberto Monteiro
]
}
hist(y3.hist)
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
An example:
n - 3
f - function(x) x^n
f(2)
# [1] 8
n - 2
f(2)
# [1] 4
f
# function(x) x^n
Ok, I know this is trivial, because function f is foverer bound
to the variable n. But how can I _fix_ n when I define _f_, so
that changing _n_ won't change the function f?
Alberto Monteiro
- 2
f(2)
# 8
Thanks for the enlightnment :-)
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
?
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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.
mention R.home()
evil grin
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
is that the stars are randomly
distributed, while the glow-worms tried to keep a distance
to each other.
My question: what is the best way to generate a glow-worm-like
distribution? I imagine that using a Latin Hypercube would
leave too many holes in the (x,y) plane.
Alberto Monteiro
) # will integrate from 0 to 1 and ignore 2:5
'plot' will probably fall into some code that uses this
vector-in-vector-out hypothesis, and then fail when the size
of x differs from the size of y.
Alberto Monteiro
PS: fff - function(x) 1
integrate(fff, 0, 1) # error. why
, 749, 250), c(250, 749, 749, 250, 250),
type=l, col=black)
dev.off()
However, I don't know how do this with a pdf monstr... oops... file.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
=c(0, 210), ylim=c(0, 297), col=white)
par(usr=c(0, 210, 0, 297))
points(c(100, 100, 200, 200, 100), c(100, 200, 200, 100, 100, 100),
type=l, col=black)
dev.off()
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
Kaustubh Patil wrote:
Is it possible to get unordered eigenvalues and eigenvectors of a
symmetric matrix in R?
Yes, see help(eigen).
If you are strict about the unordered part, do a sample(set, size)
to randomize the eigenvalues.
Alberto Monteiro
be complex (even for real
matrices). For real asymmetric matrices the vector will be
complex only if complex conjugate pairs of eigenvalues are
detected.
So, if you are strict about getting unordered eigenvalues,
you must shuffle them :-)
Alberto Monteiro
plot(z)
Now, the title is the ugly Decomposition of additive time series.
How can do this with a decent title, like Analysis of UFO abductions?
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
This must be a stupid question, but is there any extension of get?
For example:
x - 10
get(x) # gives me 10
get(x^2) # gives me an error
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
of integers.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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.
I mean, I can generate a expression, for example, with:
z - expression(x+y)
But then how can I _use_ it? Is it possible to retrieve
information from it, for example, that z is a sum, its
first argument is x (or expression(x)) and its second
argument is y?
Alberto Monteiro
- diag(c(1, 1, 0.01))
ep - v %*% t(Chol)
plot(ep[,1], ep[,2])
with a clear trend to generate points closer to the equator
then in the polar regions, against the assumption that they
should be uniformly distributed over the surface of the
ellipsoid.
Alberto Monteiro
, Sauron and brazilian president Lula :-)
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
of
displaying the first column values on y-axis against dates on x-axis.
Of course, you can combine all that into one line, but readability
will be blown up:
plot(ISOdate(floor(dat[,2] / 1), floor(dat[,2] / 100) %% 100,
dat[,2] %% 1), dat[,1])
Alberto Monteiro
)
wt - c(2, 0, 1)
wt %*% x # NA
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
:-/
if (NA == 0) is NA, then is.finite(NA) should be NA too...
if (NA == 0) 2 else 3 # gives an error
This is why I suggested a method
which tests for corresponding elements of x = NA and y = 0, since
what Alberto Monteiro wanted was 0*NA = 0, when that combination
occures. I.e.
%*NA% - function(x
Dylan Arena wrote:
I'm writing a function that calculates the probability of different
outcomes of dice rolls (e.g., the sum of the highest three rolls of
five six-sided dice).
You know there are simpler ways to do this, don't you?
Alberto Monteiro
], name1)) # ok
odbcClose(channel)
2nd, it seems that only pure strings (which are not links to
strings) and numerical values are correctly fetched or selected.
Is this a bug?
3rd, when do something like plan1[,1] a weird message about Levels
appear. What is that?
Alberto Monteiro
distribution with parameters (1,1,1...1):
http://en.wikipedia.org/wiki/Dirichlet_distribution
It's the distribution of uniform U1, U2, ... Un with the
restriction that U1 + U2 + ... + Un = 1.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
package, that uses a language that
looks like R/S, we can do things like x ~ dnorm(mu, tau),
forget that x is a normal with mean mu and variance 1/tau,
and then treat it generically.
Alberto Monteiro
PS: this is noise... but due to spam invasion, anything that
increases the nonspam/spam ratio
'?distroptions' in:
print(object)
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
Ted Harding wrote:
Creating more than one graphic windows is, as far as I know, not
possible in R.
But, as to whether/to what extent X or equivalent is available for
MS Windows, that is another question on which I have no expertise.
X11() seems to work for Windows XP.
Alberto Monteiro
to estimate the return in the case of
success.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
myArray - vector(length=0)
myArray - c(myArray, object1)
myArray - c(myArray, object2)
myArray # array with 2 strings
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
)
But this is not the most elegant solution, because there is
a function to check if all [and another to check if any] component
of a vector of booleans are [is] true: it's all(V) [resp. any(V)].
So:
all(U 0)
Sanity check:
U - c(-1, 1, 2)
all(U 0) # FALSE
U[1] - 3
all(U 0) # TRUE
Alberto Monteiro
points. How can I retrieve this information from ll?
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
of them include information about those bad points.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
para saveXML
which could translate to
Error in saveXML(tt, file = test.xml) : no method applicable to saveXML
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
)
sink()
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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.
that are very difficult
to find. Of course, YKMV.[*]
Alberto Monteiro
[*] I always use S.I. units :-)
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
to uninstall. It does the right thing.
But it will not delete the older 2.4.0 version from the Desktop,
and all other places where Windows XP places programs.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
in a human-readable but R-like form? For example, if
(say), x is a vector defined as x - c(1, 2, 3), can I write
(and read) x as a file with just one line, namely: c(1, 2, 3) ?
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
, 4, 2, 1.
x * 2^... will form the terms of the polynomial
sum will compute 2^(n-1) x[0] + 2^(n-2) x[1] + ... + 2 * x[n-1] + x[n]
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
that works for Windows XP,
and it will probably work for Linux.
Also, in Windows, there are variables homedrive and homepath,
that I could combine to form the path (probably this is what
path.expand does :-))
Sys.getenv(homepath)
Sys.getenv(homedrive)
Alberto Monteiro
Pete Cap wrote:
I'm writing a tcl/tk gui tool to wrap around RMySQL for some co-workers.
Good luck; I find the documentation on the library(tcltk) very
poor, lacking examples for most of the functions.
Alberto Monteiro
__
R-help@stat.math.ethz.ch
This works:
grep(([A-Za-z]*) , Aaaa 3 x 0 Bbbb) # 1
This also works:
grep(([A-Za-z]*) , Aaaa 3 x 0 Bbbb, value=T) # Aaaa 3 x 0 Bbbb
However, I want a grep that returns the _matched_ pattern, which, in this
case, would be Aaaa. How can I do it?
Alberto Monteiro
this:
library(gsubfn)
pat - ^([a-zA-Z ]+) ([1-9]*[0-9]) x ([1-9]*[0-9]) ([a-zA-Z ]+)$
s - My team 3 x 0 the team from Outer Space
x - strapply(s, pat, c)[[1]]
Then x[1] is s, x[2] is My team, x[3] is 3, x[4] is 0
and x[5] is the team from Outer Space.
Thanks.
Alberto Monteiro
])
..)?
It might be simpler than you thought...
HR - matrix(1:(9*27), nrow=9) # just to create a 9x27 matrix
c(HR) # oops, here it is!
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
, what are the side effects of
c()?
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
(tcltk)
tclRequire(Tktable)
# [1] FALSE
# Warning message:
# Tcl package 'Tktable' not found in: tclRequire(Tktable)
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
and there's no way of returning except by closing the R window.
Why? What am I doing wrong?
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
into an infinite loop
and there's no way of returning except by closing the R window.
Works for me with R-2.4.1 on Windows 2000. So better tell us about
the details of your operating system.
R 2.4.1 on Windows XP. Should they work differently?
Alberto Monteiro
As a big fan of Wikipedia, it's frustrating to see how little there is about
R in the correlated project, the Wikibooks:
http://en.wikibooks.org/wiki/R_Programming
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
with file.remove(CONFIG.SYS)), then this wrong answer may
be accessed by newbies. A wikipedia _may_ have wrong answers,
but these are (hopefully) ephemeral.
BTW, is it too hard to include the wiki in RSiteSearch?
Alberto Monteiro
__
R-help@stat.math.ethz.ch
Barry Rowlingson:
At some point the complexity of
installing things like this for Windows will cross the
complexity of installing Linux... (PS excepting
live-Linux installs like Knoppix)
Maybe we have reached this point :-)
Alberto Monteiro
__
R
doubts - in the hope
that someone will then fix it latter.
Example:
rnorm
This is a very weird function, because things like rnorm(0.975)
should return 1.96, but returns numeric(0)
And then someone would either rename the page to qnorm, or write
a new rnorm page.
Alberto Monteiro
on how to search.
:-)
Or I could ask help(help) to learn how help works :-P
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
Dimitris Rizopoulos wrote:
513 %/% 100
513 %% 100
Now this is a great opportunity to improve the R-Wiki.
What about a Pascal page in the R-Wiki, where a list
of Pascal-to-R translations would be available?
Alberto Monteiro
__
R-help
into the R-Wiki and _writing_ everything I learned
about R in the past 6 months...
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
into the R-Wiki and _writing_ everything I learned
about R in the past 6 months...
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
and watch !!!
#
###
#
My question: is there any way to integrate the plot part into
a tcltk window?
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
have posted
things in 10 or 12 years ago that might cause me problems today,
but I was pretty aware that I was posting to the whole world.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Dirk Eddelbuettel wrote:
My question: is there any way to integrate the plot part into
a tcltk window?
Are you aware of the tkrplot package on CRAN ?
No.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
(matrix, 1 (rows) or 2 (coluns), function)
f.dist - apply(x, 2, f)
# analyse it
hist(f.dist) # etc
R has dbinom /and/ pbinom functions, but unfortunately only a dmultinom
and no pmultinom function... perhaps because there is no (known)
faster way?
There's a rmultinom
Alberto Monteiro
, k-1)), prob=p)
What I am missing here?
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
alternative to globals
when I have a huge database where a lot of different functions
read and write.
But maybe this is ideology/religion/politics...
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
[[n-1]]), \n)
}
evil.function - function() myfunction()
evil.function()
How can I get the _arguments_ to the calls? as.character strips
them :-/
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
that can (and does) happen is that normally the package
I want requires other packages, this is easily solved with new
downloads-and-installs.
Alberto Monteiro
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Robin Hankin wrote:
If iterative methods are appropriate,
it's perhaps worth pointing out that Newton-Rapheson
works nicely for complex functions.
Hmmm... I think there are many cases where Newton-Raphson
diverges for complex functions, like those that generate
beautiful fractals.
Alberto
and RAIZ instead of SQRT.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
enough to use Excel in Linux or Mac? :-)
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
the file keeps changing.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
If there are any bugs/issues,
please report them to me and they - most likely - will get fixed.
Ok - I will do it.
Thanks.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Murphy: it tries hard to
solve the problem, but sometimes he must give up a path and backtrack
to a less optimum but faster solution.
Do I make any sense?
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
of the
product names.
So it seems that none of the four possibilities is entirely satisfactory.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
languages were developed,
would use integer and rational numbers by default, only using
floating point approximations when the integers became too big
or when forced to use irrational numbers.
But I don't think we can now repair the damage that was done
so long ago.
Alberto Monteiro
case, but using
colClasses=double, they are something that be made into dates, with
as.POSIXlt(1899-12-30, GMT) + test9[100:120,1] * 86400
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Alberto Monteiro
--
Regards,
Hans-Peter
--- End of Original Message ---
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
Please ignore the last test case. I thought I had saved it, but
I hadn't, sheet = 2 was empty. Now it works.
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
, always) may not
be the best indicator.
Take, as an extreme case, this:
A - (-50:50) + 100 * rnorm(101)
B - abs((-50):50) + 10 * rnorm(101)
C - A^2 / 50 + rnorm(101)
cor(A, C)
cor(B, C)
A is obviously the cause of C, but B (in some cases)
is better correlated to C than A to C.
Alberto Monteiro
to each country?
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
to change f to change this.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
- function() cat(g was called\n)
f(g())
[1] 1
# g was not called
Another test:
f1 - function(x, y) if (x == 0) y else 1
f1(1, y.does.not.exist)
f1(1, g())
The y-argument is never called.
So maybe it _might_ be possible to test if y exists inside the
function...
Alberto Monteiro
will install S+ in some computers.
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
...
rgamma(n = number.of.points, shape = k, scale = 1/beta)
... or ...
rgamma(n = number.of.points, shape = k, rate = beta)
) and take X = 1/Y
(unless your beta is not the rate parameter...)
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
have to test it.
Alberto Monteiro (who does not have any special affinity with
the letter I, despite this message)
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
is zero, or
so insignifantly small as not to matter. For example, if you are
measuring the density of some material, and you determine a lot
of pairs (mass, volume), you know that mass = density * volume,
with intercept zero.
Alberto Monteiro
__
R-help
after that.
Slow, but better than to use Excel alone :-)
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
values. Is it possible?
Alberto Monteiro
__
R-help@stat.math.ethz.ch 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
1 - 100 of 119 matches
Mail list logo