numerical.derivative(sin, pi) = -1# ok
numerical.derivative(exp, 0) = 1.5 # close enough
numerical.derivative(sqrt, 0) = 100 # should be Inf
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
is found.
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
it was much faster.
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
secs
t2 - t1
Time difference of 11.969 secs
Oops...
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.
/, and then I call source(file1.R),
it will run correctly. However, if I setwd to /files, then
call source(dir1/file1.R), it will give an error when
trying to source file2.R
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
[I tried to send this messages two days ago, but I guess I mistyped the To:
address...]
Why system is different in Linux and Windows? Both in R 2.4.1, but in
Windows there is an option:
system(something, wait = FALSE)
while on Linux (Fedora Core 4), there is no such option?
Alberto
), but this
tk_getOpenFile opens a nice window in Windows, but a mutilated
window in Linux, that does not show any file information except
filename. That's why I wanted to know if there was a way to
improve the function call - I think there isn't.
Alberto Monteiro
[*] I am neither paranoid nor animistic
as this, but a GUI menu with more than a few
entries is just unwieldy.
We do have a text reference to the help files in the ?tcltk topic.
Duncan Murdoch
Cheers, Mike
Mike Prager wrote:
Alberto Monteiro [EMAIL PROTECTED] wrote:
How on Earth can I know what are the arguments
to be
aborted, because it consumed all the resources of the computer.
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
would like to force the files to be sorted by
time, with most recent files coming first (and no, the purpose is
not to use for porn files).
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
incorporated your
(MacDonald's) suggestion in the R-Wiki, at...
http://wiki.r-project.org/rwiki/doku.php?id=rdoc:tcltk:tkcommands
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
the
problematic code to a minimum code that reproduces the bug,
it's much easier _for me_ to spot (and fix) the error :-)
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
), mean2, sd2)
# game over
return(rval)
}
# test
x - r.mydist(1000, 0.1, 0, 1, 0, 5)
hist(x)
if (require(fBasics))
cat(the sample kurtosis is, kurtosis(x), \n)
Now, with this sample x, how can I get back sd1, sd2 and prob?
Alberto Monteiro
__
R-help
]
... that this is the same as x[!(x %in% y)] and not x[(!x) %in% y]
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
can't think about a program that lists
all Unicode characters. A stupid and dirty solution would be:
cat(u 31 = \u31\n)
cat(u 32 = \u32\n)
...
How can I vectorize this?
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
What is the inverse of encodeString?
For example, \u1 is some Unicode symbol. If I do
s - encodeString(\u1)
then s will be the string \001. But anything I do
with s, will not return the Unicode that corresponds to \u1:
cat(s, \n) # prints \001
cat(\u1, \n) # prints y with umlaut
Alberto
) # error. Argument x must be an integer vector
intToUtf8(33:35) # ok
intToUtf8(40 + 0:9) # error. Argument x must be an integer vector
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
an error in R 2.4.1 for Windows.
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
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
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
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
...
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
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
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
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
, 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
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
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
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
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
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
[[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
, 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
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
(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
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
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
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
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
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.
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
)
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
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
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
'?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
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
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
, 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
- 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
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
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
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
) # 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
?
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
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
1 - 100 of 119 matches
Mail list logo