[R] invalid 'row.names' length error when running scatterplots or plot in R Commander

Samantha McKenzie s.mckenzie5 at uq.edu.au
Mon Sep 20 04:00:49 CEST 2010


Hello,
I teach statistics and use R Commander for teaching. I have 2 students
out of 169 that can't get scatterplots or plot to work. I have had them
update packages, restart R/R Commander/their computers and even
reinstall R/R Commander. One is using Windows 7 on a new pc and the
other is a pc user (not sure the OS). They are both using R2.11.1 and R
Commander 1.6-0. 

The data look like this:
> Mass
   Mass Fore Bicep Chest Neck Shoulder Waist Height Calf Thigh Head
1  77.0 28.5  33.5 100.0 38.5    114.0  85.0  178.0 37.5  53.0 58.0
2  85.5 29.5  36.5 107.0 39.0    119.0  90.5  187.0 40.0  52.0 59.0
3  63.0 25.0  31.0  94.0 36.5    102.0  80.5  175.0 33.0  49.0 57.0
4  80.5 28.5  34.0 104.0 39.0    114.0  91.5  183.0 38.0  50.0 60.0
5  79.5 28.5  36.5 107.0 39.0    114.0  92.0  174.0 40.0  53.0 59.0
6  94.0 30.5  38.0 112.0 39.0    121.0 101.0  180.0 39.5  57.5 59.0
7  66.0 26.5  29.0  93.0 35.0    105.0  76.0  177.5 38.5  50.0 58.5
8  69.0 27.0  31.0  95.0 37.0    108.0  84.0  182.5 36.0  49.0 60.0
9  65.0 26.5  29.0  93.0 35.0    112.0  74.0  178.5 34.0  47.0 55.5
10 58.0 26.5  31.0  96.0 35.0    103.0  76.0  168.5 35.0  46.0 58.0


This script:
> scatterplot(Calf~Bicep, reg.line=lm, smooth=FALSE, spread=FALSE, 
+   boxplots=FALSE, span=0.5, data=Mass)

Produces this error:
invalid 'row.names' length

The data look fine and correlation/regression can be done on them with
correct output. Just not scatterplots. 

I tried a work around using the following script, but still with the
same result:
attach(Mass)
Mass 
str(Mass)
names(Mass)
plot(Calf~Bicep)
abline(lm(Calf~Bicep))

I cannot repeat the error, nor have I found much information on that
error message, and I'm a bit stumped why these two students are getting
the error even after one has reinstalled the program.

Cheers,
Sam McKenzie 
The University of Queensland 



More information about the R-help mailing list