Pastafarianist

cachevector log

Jul 28th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.36 KB | None | 0 0
  1. > source("cachevector.R")
  2. > v <- 1:6
  3. > v <- makeVector(v)
  4. > v$get()
  5. $set
  6. function (y)
  7. {
  8.     x <<- y
  9.     m <<- NULL
  10. }
  11. <environment: 0x0000000015154618>
  12.  
  13. $get
  14. function ()
  15. x
  16. <environment: 0x0000000015154618>
  17.  
  18. $setmean
  19. function (mean)
  20. m <<- mean
  21. <environment: 0x0000000015154618>
  22.  
  23. $getmean
  24. function ()
  25. m
  26. <environment: 0x0000000015154618>
  27.  
  28. >
Add Comment
Please, Sign In to add comment