Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More failsafe and made sure the example wouldn't run when the file is…

… sourced
  • Loading branch information...
commit 6cd612f4b2595d2c0d869eec01fe3d1bf7380b34 1 parent 23916b3
@talgalili authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 tabular.cast_df.r
View
6 tabular.cast_df.r
@@ -2,6 +2,7 @@ tabular.cast_df <- function(xx,...)
{
# a bunch of assumptions that must be met for this function to work:
if(!require(reshape)) stop("The {reshape} package must be installed for this function to work")
+ if(!require(tables)) stop("The {tables} package must be installed for this function to work")
if(! any(class(xx) == "cast_df")) stop("This function only works for cast_df objects")
# xx is a casted object
@@ -54,8 +55,7 @@ tabular.cast_df <- function(xx,...)
-
-
+if(F) {
###########################################
###### Examples
@@ -159,3 +159,5 @@ tabular.cast_df(cast(aqm, month*temp2*variable2 ~ ., c(mean,sd))) # same issue
# temp 81.000 NA
# ......
+
+} # end of if(F)
Please sign in to comment.
Something went wrong with that request. Please try again.