Description Usage Arguments Value See Also Examples
This function computes the percentage of unique values of a column x
from table1
that appear in
in a table2
. It is called and computed on the fly in tableNet
. However, these computations can be
slow on large datasets, so it is provided a standalone function that can be run once to store the output and fed into the
tableNet
app to prevent repetitive slow computations on the fly.
1 | isKey(dfL, xvar)
|
dfL |
list of data.frames. easily generated from |
xvar |
character string, name of the variable to calculate strength for across all tables in |
printdf |
prints progress of flat file loads to R console. |
list of data.frames
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
## download some baseball data. NOTE This will download 30MB of data (25 csv files) into a temporary directory
temp <- tempfile()
localDataDir <- paste0(tempdir(), '\\lahman2012-csv-onYourComp.zip')
download.file('http://seanlahman.com/files/database/lahman2012-csv.zip', localDataDir)
unzip(localDataDir, exdir=paste0(tempdir(), '\\lahman2012-csv-onYourComp')) ## may not be necessary
## create a list of data.frames from .CSVs
dfL <- dir2dfList(paste0(tempdir(), '\\lahman2012-csv-onYourComp'), ext='.csv', exclude=NULL, sep=',', stringsAsFactors=F)
isKey(dfL, 'playerID')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.