Am Donnerstag, den 04.08.2011, 02:58 +0200 schrieb Rosario Garcia Gil:
I am trying to draw a basic black and white map of two European countries.
Are you planning just to draw the boundaries? Or what do you mean by
basic black and white.
After searching some key words in google and reading
Dieter Menne schrieb:
Marc Schwartz-3 wrote:
I thought that readers of R-Help might find the following article at
ScienceNews of interest:
Odds Are, It's Wrong
Science fails to face the shortcomings of statistics
By Tom Siegfried
March 27th, 2010; Vol.177 #7 (p. 26)
Tal Galili schrieb:
I just realized (after many discussion with friends), that I might need to
solve a (classical) graph theory problem with R.
My specific problem is called:
Minimum vertex cover http://en.wikipedia.org/wiki/Vertex_cover#Definition for
a hypergraph
Erin Hodgess schrieb:
xy
[1] 0.7305081 2.4224211
str(xy)
num [1:2] 0.73 2.42
any(xy) 1
[1] FALSE
Warning message:
In any(xy) : coercing argument of type 'double' to logical
What am I doing wrong please?
xy 1 should return TRUE FALSE, and you want to apply
Steven Kang schrieb:
Dear R users,
I would like to accumulate objects generated from 'for' loop to a list or
array.
To illustrate the problem, arbitrary data set and script is shown below,
x - data.frame(a = c(rep(n,3),rep(y,2),rep(n,3),rep(y,2)), b =
c(rep(y,2),rep(n,4),rep(y,3),n), c =
Mehdi Khan schrieb:
http://www.amazon.com/gp/product/007310874X/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=304485901pf_rd_s=lpo-top-stripe-1pf_rd_t=201pf_rd_i=0256117365pf_rd_m=ATVPDKIKX0DERpf_rd_r=155Y7AP1SHTSJESHM15M
This is our textbook for regression analysis. Go through the first 8 or 9
chapters and
Am 19.05.2009 um 05:39 schrieb phen_ys:
surgery - data.frame(outcome = c(0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0,
+ 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0), age = c(50, 50, 51,
+ 51, 53, 54, 54, 54, 55, 55, 56, 56, 56, 57, 57, 57, 57, 58,
+ 59, 60,
Debbie Zhang schrieb:
Dear R users,
I incurred some problems with importing data into R.
i.e. If I want to import a text file or word file which contains lots of
numerical numbers, what function should I use?
It does help if you read the posting guide first. In general, the file
has to
jim holtman schrieb:
Try this:
key - rownames(a)
key[key == AT] - TA
do.call(rbind, by(a, key, colSums))
something like
paste(sort(strsplit(key, split=)[[1]]), )
might be more general.
__
R-help@r-project.org mailing list
Liz Webb schrieb:
Hi,
I would like to draw a graph as follows:
A simplified example is that on the X axis are different countries, I have
several temperature measurements taken from each country and would like to plot
these linearly above each country. So one would imagine that cold countries
If you are in the context of a data frame (which is closest to the
concept
of a data set in SAS), the 1:nrow(df) is closest to what you may look
for.
For instance:
data(iris)
.n. - 1:nrow(iris)
You may notice that this number is not very idiomatic in R.
If you have something like:
if(_N_
Am 03.12.2008 um 09:06 schrieb Liviu Andronic:
Dear all,
I'm looking for an alternative way to replicate the 2, string for an
x number of times, and end up with one string containing 2, x times.
I can partly achieve this using replicate().
y - rep(2,, times=3)
y
JFTR: replicate() is a
Am 30.10.2008 um 16:53 schrieb [EMAIL PROTECTED]:
Hallo! ?xml:namespace prefix = o ns =
urn:schemas-microsoft-com:office:office /o:p/o:p
[...]
[[alternative HTML version deleted]]
This is a rare case where I would have liked to see the HTML version in
order to see how
Am 18.10.2008 um 23:03 schrieb Michael Just:
Hello,
I was wondering if there was a way to only select cases my from data
frame that contained a negative value?
c-c(1,2,3,4,5,6,7,8,9,10)
d- c(-1,2,-3,-4,5,6,-7,8,-9,10)
f - cbind(c,d)
dat -data.frame(f)
dat.lm -lm(c~d)
If I wanted to only
Am 12.10.2008 um 01:39 schrieb Felipe Carrillo:
Does LATEX have to be installed on your computer?
Not necessarily, but you'd have to have a graphic imagination to get an
idea of how your document will look printed on paper. The general idea
is that you don't have to (separation of content
Am 27.09.2008 um 05:46 schrieb John Sorkin:
Windows XP
R 2.7.1
I am trying to use apply (or lapply, sapply) to get the sample
function to select 1000 samples of size 10 from c(1,2,3) with
probability c(0.1,0.2,0.7), i.e.
for (i in 1:1000)
{
Am 23.09.2008 um 23:57 schrieb Peter Dalgaard:
For this kind of problem I'd go directly for the binomial
distribution. If the actual probability is 0, this is essentially
deterministic and you can look at
binom.test(0,99,p=.03, alt=less)
This means that you don't sample from the p=.03
This is an attempt to an answer to Geertja van der Heijden's question,
which seems not to have been answered yet.
Your attempt was:
drought - read.table(D:/drought080525.txt, header=T)
regres - function(x, indices) {
x - x[indices,]
coef(lm(x$AGB ~ x$days, weights=x$weights))
}
and what you
Am 15.08.2008 um 14:00 schrieb Roger Leenders:
I can draw the polygon as above, but I don't know how to do the
coloring. It is easy to give the polygon only one color (e.g. through
polygon(c(x1,x2),c(y1,y2), col=red)), but I need a way in which to
color the polygon such that the color moves
of the font, you have some useful
parameters such
as cap height, ascender height, descender height, oblique angle ...
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale returns of conjecture
mailto:[EMAIL PROTECTED
Rolf Turner [EMAIL PROTECTED] [Thu, May 01, 2008 at 06:59:29AM CEST]:
On 1/05/2008, at 4:40 PM, Johannes Hüsing wrote:
[...]
When you do the following:
for (i in 1:100) {
summary(rnorm(80))}
what output do you get?
He'd get nothing at all.
That's the point
schoappied [EMAIL PROTECTED] [Thu, May 01, 2008 at 06:00:51PM CEST]:
what is a good alternative for matlab?
Octave is generally said to be the alternative.
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale
the following:
for (i in 1:100) {
summary(rnorm(80))}
what output do you get?
And all this output is redirected to your file by sink(), so it works
as expected.
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale
Beck, Kenneth (STP) [EMAIL PROTECTED] [Tue, Apr 29, 2008 at 07:21:40PM CEST]:
mxx=max(cpx_list$nMV);
mxy=max(trend_list$nMV);
if (mxxmxy)
mxy=mxx
else
mxx=mxy
Can't this be replaced by
mxx - max(c(cpx_list$nMV, trend_list$nMV))
mxy - mxx
?
--
Johannes Hüsing
Am 07.04.2008 um 12:24 schrieb Richard Cotton:
thegeologician wrote:
Of course, these plots could be plotted separately with a common
x-axis,
it's just a matter of saving space and of being used to that kind of
graph. I can't imagine anyone being falsely lead to a thought like oh
gosh,
You can use the function permutation from the e1071 package,
then
library(e1071)
multisetperm - function(multiset) {
unique(apply(matrix(multiset[permutations(length(multiset))],
ncol=length(multiset)), 1, paste, sep=, collapse=)) }
multisetperm(c(0, 0, 1, 2, 2))
The output would look
be performed
independently and are parallelizable. By the same token as I use
map instead of recursion in Lisp.
R is essentially concealed Lisp, or so I'm told.
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale
I wonder how long it will take until metereologists will see the light.
http://www.zoolex.org/walter.html
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Am 02.03.2008 um 17:44 schrieb Gabor Csardi:
I'm not a statistician, but do i remember well that among all
distributions with a given mean and variance, the normal distribution
has the highest entropy? This is good enough for me to call it
normal
There's more. Among all
occurred to a more experienced expRt because
indices wouldn't turn up in the code at all:
mm - function(m, n) {
a - array(nrow=m, ncol=n)
row(a)+col(a)
}
Greetings
Johannes
--
Johannes Hüsing There is something fascinating about science.
One
/_k3l6qPzizGs/RvDVglPknRI/AKo/itlWOvuuOtI/s1600-h/pairwise_kl_window60.png
type ?heatmap at the R prompt and proceed from there.
Greetings
Johannes
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale
a little bit of
computation time by singling these group-preserving permutations
out, but this is not worth the while at all.
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale returns of conjecture
mailto:[EMAIL
Armin Goralczyk [EMAIL PROTECTED] [Mon, Dec 17, 2007 at 11:07:25AM CET]:
[AUC]
I tried it:
y-c(1,2,3,4,5);x-c(10,15,10,5,0)
Are you sure you don't have x and y wrong? Normally the x values
should be monotonically increasing.
--
Johannes H�sing There is something fascinating
Mark Kimpel [EMAIL PROTECTED] [Sat, Dec 01, 2007 at 05:28:28PM CET]:
What I would find useful would be some sort of tagging system for messages.
Hrm. I find tags immensely useful for entities which do not contain primarily
text, such as photos. I am at doubt how keywords are important when they
Antony Unwin [EMAIL PROTECTED] [Thu, Nov 22, 2007 at 12:43:07PM CET]:
There have been several constructive responses to John Sorkin's
comment, but none of them are fully satisfactory. Of course, if you
know the name of the function you are looking for, there are lots of
ways to search ?
)))
single - TRUE
}
}
value - if (single)
.Internal(par(args))[[1]]
else .Internal(par(args))
if (!is.null(names(args)))
invisible(value)
else value
}
environment: namespace:graphics
--
Johannes Hüsing There is something fascinating about science
Dear expRts,
I just realized that the ... argument in a function cannot be used without
taking precautions sometimes. The following behaviour is what I stumbled
upon:
myrepl - function(length, fun, ...) {
+ replicate(length, fun(...))}
myrepl(20, sample, 1:5)
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Excuse me, but I think your code deserves some comments. Unfortunately,
the history of postings is in reverse order, so I'll address your
first question first:
The simulation looks like this:
z - 0
x - 0
y - 0
aps - 0
tiss - 0
for (i in 1:500){
z[i] - rbinom(1, 1, .6)
This is beautiful, thank you!
Greetings
Johannes
__
R-help@r-project.org 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,
39 matches
Mail list logo