[R] Error in dimnames(phi) <- list(rn, dims) : length of 'dimnames' [2] not equal to array extent

Yonas Yohannes yonas at wku.edu.et
Tue May 19 08:23:07 CEST 2015


Dear Oleg,
Thank you so much for your advice! But I tried to update the packages and
check whether the problem is fixed. But I end up with the same error.
Error in dimnames(phi) <- list(rn, dims) :
  length of 'dimnames' [2] not equal to array extent

It seems to me that, what I got to update from R-forge is version 0.60 not
version 0.61. Please see below the script I got while updating the package:

trying URL 'http://R-Forge.R-project.org/bin/windows/contrib/3.1/ca_0.60.zip
'

Content type 'application/zip' length 98081 bytes (95 KB)

opened URL

downloaded 95 KB


Do you think version 0.60 is not fixing the problem?

Kindly,

Yonas


On Mon, May 18, 2015 at 6:52 PM, Oleg Nenadić <onenadi at uni-goettingen.de>
wrote:

> David, Thanks for forwarding this to me.
>
> Yonas, Please try updating your ca package to version 0.61 which fixes
> this issue. This is not the latest official CRAN version, so get it from
> R-forge via
> > update.packages("ca", repos = "http://r-forge.r-project.org")
>
> All the best,
> Oleg.
>
>
>
> On 18/05/2015 16:27, David L Carlson wrote:> I think this is a bug in the
> current version of ca() in package ca. I am copying the package maintainer
> with this example:
> >
> > # Reproducible example from manual page for ca():
> >
> >> library(ca)
> >> data("author")
> >> author.ca <- ca(author) # No problem
> >> author.ca <- ca(author, nd=3)
> > Error in dimnames(phi) <- list(rn, dims) :
> >    length of 'dimnames' [2] not equal to array extent
> >> library(MASS)
> >> author.ca <- corresp(author, nf=3) # No problem
> >
> > So the MASS version of correspondence analysis, corresp(), is able to
> extract three dimensions (actually up to 11) from "author". I am certain I
> have used ca() in the past and extracted more than two dimensions from
> similar tables.
> >
> > -------------------------------------
> > David L Carlson
> > Department of Anthropology
> > Texas A&M University
> > College Station, TX 77840-4352
> >
> >
> >
> > -----Original Message-----
> > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Jim
> Lemon
> > Sent: Sunday, May 17, 2015 7:31 PM
> > Cc: r-help mailing list
> > Subject: Re: [R] Error in dimnames(phi) <- list(rn, dims) : length of
> 'dimnames' [2] not equal to array extent
> >
> > Hi Yonas,
> > If this is the "ca" function from the package of the same name, it
> > looks to me as though your data set is only two dimensions and you are
> > requesting 3 dimensions in the output. Have you tried calling ca with
> > the default nd=NA?
> >
> > Jim
> >
> >
> > On Mon, May 18, 2015 at 3:22 AM, Jeff Newmiller
> > <jdnewmil at dcn.davis.ca.us> wrote:
> >> You desperately need to study [1] and the Posting Guide mentioned at
> the bottom of this and every other message on this list.
> >>
> >> [1]
> http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
> >>
> ---------------------------------------------------------------------------
> >> Jeff Newmiller                        The     .....       .....  Go
> Live...
> >> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#. Live
> Go...
> >>                                        Live:   OO#.. Dead: OO#.. Playing
> >> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> >> /Software/Embedded Controllers)               .OO#.       .OO#.
> rocks...1k
> >>
> ---------------------------------------------------------------------------
> >> Sent from my phone. Please excuse my brevity.
> >>
> >> On May 17, 2015 7:31:08 AM PDT, Yonas Yohannes <yonas at wku.edu.et>
> wrote:
> >>> Dears,
> >>> I have presence and absence data set (8 rows and 33 columns) and when I
> >>> want to get out of the default two dimensions command using
> >>> summary(ca(mydata,
> >>> nd=3)) the following error message displyed:
> >>>
> >>> Error in dimnames(phi) <- list(rn, dims) :
> >>>   length of 'dimnames' [2] not equal to array extent
> >>>
> >>> Please help! So many thanks in advance!
> >>> Kindly,
> >>> * <mail%3Ayonas at wku.edu.et>*
> >>>
> >>>        [[alternative HTML version deleted]]
> >>>
> >>> ______________________________________________
> >>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >>> 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.
> >>
> >> ______________________________________________
> >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> 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.
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list