Running examples in 'SSN-Ex.R' failed
The error most likely occurred in:

> ### Name: as.SpatialLines
> ### Title: Methods to convert SpatialStreamNetwork objects classes to sp
> ###   classes
> ### Aliases: as.SpatialLines as.SpatialPoints as.SpatialLinesDataFrame
> ###   as.SpatialPointsDataFrame as.SpatialLines.SpatialStreamNetwork
> ###   as.SpatialPoints.SpatialStreamNetwork
> ###   as.SpatialLinesDataFrame.SpatialStreamNetwork
> ###   as.SpatialPointsDataFrame.SpatialStreamNetwork
> 
> ### ** Examples
> 
> 
> library(SSN)
> #for examples, copy MiddleFork04.ssn directory to R's temporary directory
> copyLSN2temp()
NULL
> # NOT RUN
> # Create a SpatialStreamNetork object that also contains prediction sites
> #mf04p <- importSSN(paste0(tempdir(),'/MiddleFork04.ssn'), 
> #  predpts = "pred1km", o.write = TRUE)
> #use mf04p SpatialStreamNetwork object, already created
> data(mf04p)
> #for examples only, make sure mf04p has the correct path
> #if you use importSSN(), path will be correct
> mf04p <- updatePath(mf04p, paste0(tempdir(),'/MiddleFork04.ssn'))
[1] "SSN path updated to D:\\temp\\Rtmp0qzvZu/MiddleFork04.ssn"
> 
> names(mf04p)
$Obs
 [1] "NCEASID"    "STREAMNAME" "HUC3"       "HUC4"       "COMID"     
 [6] "CUMDRAINAG" "AREAWTMAP"  "MAXELEVSMO" "SLOPE"      "NCEASID_"  
[11] "ELEV_DEM"   "Deployment" "SampleYear" "NumberOfDa" "OriginalID"
[16] "Source"     "Summer_mn"  "MaxOver20"  "C16"        "C20"       
[21] "C24"        "FlowCMS"    "AirMEANc"   "AirMWMTc"   "NEAR_FID"  
[26] "NEAR_DIST"  "NEAR_X"     "NEAR_Y"     "NEAR_ANGLE" "rid"       
[31] "ratio"      "afvArea"    "upDist"     "locID"      "netID"     
[36] "pid"       

$pred1km
 [1] "COMID"      "GNIS_NAME"  "CUMDRAINAG" "HUC3"       "HUC4"      
 [6] "AREAWTMAP"  "MAXELEVSMO" "SLOPE"      "COMID_"     "ELEV_DEM"  
[11] "FlowCMS"    "AirMEANc"   "AirMWMTc"   "SampleYear" "NEAR_FID"  
[16] "NEAR_DIST"  "NEAR_X"     "NEAR_Y"     "NEAR_ANGLE" "rid"       
[21] "ratio"      "afvArea"    "upDist"     "locID"      "netID"     
[26] "pid"       

$Knapp
 [1] "COMID"      "GNIS_NAME"  "CUMDRAINAG" "HUC3"       "HUC4"      
 [6] "AREAWTMAP"  "MAXELEVSMO" "SLOPE"      "COMID_"     "ELEV_DEM"  
[11] "FlowCMS"    "AirMEANc"   "AirMWMTc"   "SampleYear" "NEAR_FID"  
[16] "NEAR_DIST"  "NEAR_X"     "NEAR_Y"     "NEAR_ANGLE" "rid"       
[21] "ratio"      "afvArea"    "upDist"     "locID"      "netID"     
[26] "pid"       

$CapeHorn
 [1] "COMID"      "GNIS_NAME"  "CUMDRAINAG" "HUC3"       "HUC4"      
 [6] "AREAWTMAP"  "MAXELEVSMO" "SLOPE"      "COMID_"     "ELEV_DEM"  
[11] "FlowCMS"    "AirMEANc"   "AirMWMTc"   "SampleYear" "NEAR_FID"  
[16] "NEAR_DIST"  "NEAR_X"     "NEAR_Y"     "NEAR_ANGLE" "rid"       
[21] "ratio"      "afvArea"    "upDist"     "locID"      "netID"     
[26] "pid"       

> 
> #---------
> # make plots using sp methods
> #---------
> #plot the stream lines
> plot(as.SpatialLines(mf04p), col = "blue")
Error in as.double(y) : 
  cannot coerce type 'S4' to vector of type 'double'
Calls: plot -> plot -> plot.default -> xy.coords
Execution halted