[R] A Request

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Wed Jun 22 01:36:15 CEST 2022


Hi Chishti,
Try this:

dim(x)[2]
length(dn)

>From your error message, the two will be different. They should be the
same. A wild guess is that the offending line of code should be:

dimnames[2]<-1:dn

Jim

On Tue, Jun 21, 2022 at 11:10 PM Muhammad Zubair Chishti
<mzchishti using eco.qau.edu.pk> wrote:
>
> Hi, Dear Professor,
> When I run a code in R, I face the following error:
> Error in dimnames(x) <- dn :
>   length of 'dimnames' [2] not equal to array extent
>
> Kindly help how to handle this.
>
> Regards
> Chishti
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using 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.



More information about the R-help mailing list