Basically dropping by saying what's already been said, but also that
you probably want to do whatever you're trying to achieve using
vectorized operations. A small summary with some tweaks:
## Generate an array with a "random" number of dimensions
dim <- c(4, 5, 6, 7)
dimnames <- lapply(1:4, FUN=
On May 30, 2015, at 8:56 AM, Michelle Morters wrote:
> Hi - I'm trying to generate the (toy) matrix below in R. I get the error
> message shown below (and no matrix!) and I'm unclear as to why - if
> someone could advise as to why, that would be ace. Thank you! Michelle
>
>
> 0.7 0 0.
On May 29, 2015, at 10:02 AM, Cade, Brian wrote:
> Wensui: There are the multi-response permutation procedures (MRPP) that
> readily test the omnibus hypothesis of no distributional differences among
> multiple samples for univariate or multivariate responses. There also are
> empirical coverag
thanks for your comment, Bert
as pointed out by Brian, mrpp suits my need.
On Sat, May 30, 2015 at 2:02 PM, Bert Gunter wrote:
> ... or in not testing at all. The distributions are not the same, period. So
> what. Testing for equality is useless -- the real question is: what issues
> are you tryi
Their 'srcref' attributes differ. srcref describes the text that
the parser was given when creating the function.
> identical(f1 <- function(x)1, f2 <- function(x)1)
[1] FALSE
> str(f1)
function (x)
- attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 17 1 28 17 28 1 1
.. ..- attr(*, "srcfile")=
On 30/05/2015 10:35 AM, Munawar Cheema wrote:
> I am puzzled by the following seemingly contradictory calls to the function
> identical. Below is a minimal example, that reproduces them:
>
>> sessionInfo()
> R version 3.2.0 (2015-04-16)
> Platform: x86_64-apple-darwin13.4.0 (64-bit)
> Running unde
Sorry - I have solved my problem already - please don't post the request
for advice on how to generate a matrix with zeros in alternate rows &
alternate elements in the supra-diagonal
Cheers
Michelle
__
R-help@r-project.org mailing list -- To UNSUBSC
Hi - I'm trying to generate the (toy) matrix below in R. I get the error
message shown below (and no matrix!) and I'm unclear as to why - if
someone could advise as to why, that would be ace. Thank you! Michelle
0.7 0 0.1 0 0.1 0 0 0 0 0
0
I am puzzled by the following seemingly contradictory calls to the function
identical. Below is a minimal example, that reproduces them:
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)
locale:
[1] C
attached base pa
... or in not testing at all. The distributions are not the same, period.
So what. Testing for equality is useless -- the real question is: what
issues are you trying to address/ what questions are you trying to answer/
can they be answered with the data you have or plan to get?
In any case, this
On May 30, 2015, at 7:09 AM, Wensui Liu wrote:
> Thanks for your insight, David
> But I am not interested in comparing means among multiple groups.
> Instead, I want to compare empirical distributions. In this case, I am
> not sure if wilcoxon should be still applicable.
>
> still appreciate it.
Don't.
Arrays in R don't have variable dimensions [1]. To the extent that you pretend
otherwise, you will degrade performance and complicate your program. I would
argue that similar effects arise in languages that do let you pretend that
arrays have variable dimensions.
The main reason variabl
I don't know for sure what result you want, but it may be that
using a length(dim(array))-column matrix as your subscript will
do what you want. E.g.,
> a <- array(101:124, dim=4:2)
> subscriptMatrix <- cbind(c(1,3), c(2,2), c(2,1))
> subscriptMatrix
[,1] [,2] [,3]
[1,]12
Thanks for your insight, David
But I am not interested in comparing means among multiple groups.
Instead, I want to compare empirical distributions. In this case, I am
not sure if wilcoxon should be still applicable.
still appreciate it.
On Fri, May 29, 2015 at 1:32 PM, David Winsemius wrote:
>
Adding a bit of formatting
Where your data is dat1
dat1$reference <- factor(dat1$reference, levels =
dat1$reference[order(dat1$year)])
pp2 <- ggplot(dat1, aes( reference, size)) + geom_bar( stat = "identity") +
coord_flip()
pp2 <- pp2 + ggtitle("Studies with Cross-sectional estimates") +
> It's possible that the mirror manager is unaware of this, and might like
> to be informed. I know him, and will send an email.
>
> Duncan Murdoch
Thanks Duncan.
--
Cheers, Mark
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
h
Yes you can do it fairly easily in 'basic' ggplot2. You need to change the
references from factors to ordered factors and then plot.
Note your data is now called dat1 as df is an R function. Do ?df to see what it
is.
dat1$reference <- factor(dat1$reference, levels =
dat1$reference[order(dat1
I am using another mirror. Just being a good net.citizen.
On Fri, May 29, 2015 at 11:03 PM, Jeff Newmiller
wrote:
> This is why there are mirrors. You don't have to wait for them or tell
> them to do their jobs.
> ---
> Jeff
HI everybody.
I'm using the package 'metagen' to plot sample size in meta-analysis.
The plot function of the package reorders the studies by alphabetcial order.
However, I would like to have the studies listed by year.
How can I force the plotting function to order the study by the variable
'year'
You need the vectorizes ifelse() instead of if().
Also watch out for order of operations in the last line, and there is
already a base R function named scale(). And spelling of arguments, of
course.
On Saturday, May 30, 2015, Sohail Khan wrote:
> Hi R Gurus,
>
> I am writing a simple function t
Hi R Gurus,
I am writing a simple function that take a numeric vector column from a
data frame and scales the vector column with certain criteria. I would
then pass this function to a list of dataframes by lappy.
Question is how do I write a function that works on a numeric vector. My
function
On 30/05/2015 11:29, WRAY NICHOLAS wrote:
Hello folks
Supposing I have a multidimensional array in an R prog, say a 4D array.
I want the coordinate quantities to be read off from a vector. The values
in the vector (vec) are generated by a function.
It is not clear what you want to do.
This
On 29/05/2015 11:27 PM, David Winsemius wrote:
>
> On May 29, 2015, at 7:12 PM, Mark Drummond wrote:
>
>> I've been getting a 403 when I try pulling from the Toronto CRAN mirror
>> today.
>>
>> http://cran.utstat.utoronto.ca/
>
> Right. It's been out for the last 2.7 days:
>
> http://cran.r-pro
Hi Nick,
Does length(dim(X)) help by getting the current dimensions of the
array before you pass the vectors of indices?
Jim
On Sat, May 30, 2015 at 8:29 PM, WRAY NICHOLAS
wrote:
> Hello folks
>
> Supposing I have a multidimensional array in an R prog, say a 4D array.
>
> I want the coordinate
Hello folks
Supposing I have a multidimensional array in an R prog, say a 4D array.
I want the coordinate quantities to be read off from a vector. The values
in the vector (vec) are generated by a function.
This is easy if the number of dimensions is fixed for both the array and
the number of e
25 matches
Mail list logo