Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
if(getRversion() < "2.14.1")
{
warning("Your version of R is older than 2.14.1")
q() # exit R, with the option to cancel
}

View file

@ -0,0 +1,5 @@
bloop <- -3.4
if(exists("bloop", envir=globalenv()) && exists("abs") && is.function(abs))
{
abs(bloop)
}

View file

@ -0,0 +1,15 @@
#Declare some integers
qqq <- 45L
www <- -3L
#Retrieve the name of all the variables in the user workspace
var_names <- ls()
#Retrieve the actual variables as a list
all_vars <- mget(var_names, globalenv())
#See which ones are integers
is_int <- sapply(all_vars, is.integer)
#Count them
sum(is_int)
#Retrieve the variables that were integers
the_ints <- mget(varnames[is_int], globalenv())
#Add them up
sum(unlist(the_ints))