Skip to content
Prev 275419 / 398506 Next

Adding points to a wireframe: 'x and units must have length >0' error

On Oct 24, 2011, at 5:25 PM, Dennis Murphy wrote:

            
Hi Dennis;

My code was run with 2 objects, one named 'pts1' and the other 'pts'  
in the global environment as defined by one of Megan's posts. I don't  
remember why I constructed pts in the .GlobalEnv.

  dput(pts1)
structure(list(x = c(-0.0419496586546302, -1.39076532330364,
-1.53872193582356, -0.839783592149615, -1.88289892859757,  
-2.52944178972393,
-1.23924672044814, -2.46829973813146, -1.2426444850862,  
-3.86455787997693
), y = c(31.9964704941958, 31.6723003052175, 31.2804223783314,
17.4949281662703, 22.1439493726939, 14.630113914609, 35.1232215203345,
32.1026838570833, 12.7179794665426, 6.87488709576428), z =  
c(-1.34224101538446,
-44.0487369737558, -48.1318720753647, -14.6919536198699,  
-41.6948185487642,
-37.0060215240335, -43.5263370806479, -79.2390461577559,  
-15.8039270455387,
-26.5683990998875)), .Names = c("x", "y", "z"), row.names = c(NA,
-10L), class = "data.frame")

 > dput(pts)
structure(list(x = c(-0.709913841938187, -2.226621954599,  
-1.02527262434301,
0.147471310497732, 2.89475540039884, -1.68228706472879,  
1.73863850383242,
1.59522310445109, 3.04188037381882, -2.36433846151287), y =  
c(-2.94305674070926,
0.554983744134881, -0.176610316985743, 2.69128450161348,  
-0.14117131376901,
-0.956096979105434, -1.43965903354312, 2.39438632633848,  
1.96241983601171,
1.39501741394904), z = c(-0.0230211657471955, 0.734076026827097,
-0.206860289443284, -0.302051985170692, -0.498272170778364,  
0.295380563940853,
-0.0442760540172458, 0.771657421719283, -0.60832396754995,  
0.945741532370448
)), .Names = c("x", "y", "z"), row.names = c(NA, -10L), class =  
"data.frame")

With reference to Megan's report of success after "defining the *lim  
values prior to the function actually made it work" , I checked to see  
if I had perhaps done something like that and did not find anything:

 > grep("lim", ls())
integer(0)


I suppose there are other possible differences because I have quite a  
few more packages loaded:

 > sessionInfo()
R version 2.13.1 RC (2011-07-03 r56263)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
  [1] tcltk     grid      splines   stats     graphics  grDevices utils
  [8] datasets  methods   base

other attached packages:
  [1] zoo_1.7-4             RJDBC_0.2-0           rJava_0.9-1
  [4] sqldf_0.3-5           chron_2.3-39          gsubfn_0.5-5
  [7] RSQLite.extfuns_0.0.1 RSQLite_0.9-4         DBI_0.2-5
[10] mnormt_1.4-3          geepack_1.0-18        doBy_4.4.0
[13] MASS_7.3-13           snow_0.3-5            lme4_0.999375-39
[16] Matrix_0.999375-50    multcomp_1.2-7        mvtnorm_0.9-999
[19] R2HTML_2.2            ggplot2_0.8.9         proto_0.3-9.2
[22] reshape_0.8.4         plyr_1.6              reshape2_1.1
[25] akima_0.5-4           foreign_0.8-45        rms_3.3-1
[28] Hmisc_3.8-3           survival_2.36-9       sos_1.3-1
[31] brew_1.0-6            lattice_0.19-30

loaded via a namespace (and not attached):
[1] cluster_1.14.0 nlme_3.1-101   stats4_2.13.1  stringr_0.5     
tools_2.13.1
David Winsemius, MD
West Hartford, CT