Technically this question is off-topic on this mailing list (read the Posting
Guide!), but I might hazard a guess that the package doesn't like using
variable that is a lowercase "c" since that is an extremely common R function
name. You can sometimes get away with this, but it takes very carefu
Hello,
I am performing Latin Hypercube sampling from functions "makeParamSet" and
"generateDesign" (package "ParamHelpers") in R. Using the function
"makeParamSet", how can I specify a formula to define a given parameter ? Here
is an example where "g� is the product of �a� and �c�:
ps <- make
Dear Vito,
if we don�t know the number of break points �a priori�, and the davies.test
function returns a significant result, how can I obtain the exact number of
break points for a �lm�? I would to know this in order to specify in a properly
way the �npsi� option in the segmented function.
Th
Dear Vito,
if we don�t know the number of break points �a priori�, and the davies.test
function returns a significant result, how can I obtain the exact number of
break points for a �lm�? I would to know this in order to specify in a properly
way the �npsi� option in the segmented function.
Th
Does it have to be a histogram or does it just have to look like one?
counts <- c(73,53,42,67,41,50)
vals <- c(1,2,3,4,5,6)
barplot(counts~vals, space=0)
If you want a more histogram-like axis:
barplot(counts~vals, space=0, names.arg="")
axis(1, 1:6 - .5, 1:6)
David L Carlson
Anthropology Depar
Hello,
Here are 3 ways.
The first are almost the same, they use base graphics.
x <- 1:6
y <- c(73,53,42,67,41,50)
barplot(setNames(y, x))
Or
names(y) <- x
barplot(y)
And 3:
library(ggplot2)
ggplot(data.frame(x, y), aes(x, y)) +
geom_col()
Hope this helps,
Rui Barradas
Às 16:12 de 0
Aargh of course - so obvious I'd completely overlooked that.>. Thanks Nick
> On 09 October 2019 at 16:21 Ivan Krylov wrote:
>
>
> On Wed, 9 Oct 2019 16:12:57 +0100 (BST)
> Nick Wray via R-help wrote:
>
> > I have a vector like say 73,53,42,67,41,50 where these numbers are
> > the number of oc
Sorry; that was not the working version.
Should be
freqs <- c(11, 19, 5, 3, 2, 1, 0, 0, 2, 3, 2)
freqhist <- function(counts, xname=deparse(substitute(counts)),
breaks=0:length(counts),
mids=(breaks[-1]+breaks[-length(breaks)])/2 , ...){
binwidths <- diff(brea
> I have a vector like say 73,53,42,67,41,50 where these numbers are the
> number of occurrences of the data values 1,2,3,4,5,6 - so in essence I have
> the frequency bit from the hist() function. I can't see an elegant way (there
> are clearly messy workarounds like generating a vector of 73 1's,
On Wed, 9 Oct 2019 16:12:57 +0100 (BST)
Nick Wray via R-help wrote:
> I have a vector like say 73,53,42,67,41,50 where these numbers are
> the number of occurrences of the data values 1,2,3,4,5,6
> I can't see an elegant way <...> of creating a histogram from this
> data set. Is there one?
A h
I have a vector like say 73,53,42,67,41,50 where these numbers are the number
of occurrences of the data values 1,2,3,4,5,6 - so in essence I have the
frequency bit from the hist() function. I can't see an elegant way (there are
clearly messy workarounds like generating a vector of 73 1's, 53 2
11 matches
Mail list logo