You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Bob Rudis b713d6b497 pkg rename 8 years ago
R pkg rename 8 years ago
inst/img returns almost everything 8 years ago
man pkg rename 8 years ago
src pkg rename 8 years ago
tests pkg rename 8 years ago
.Rbuildignore initial commit 8 years ago
.gitignore initial commit 8 years ago
.travis.yml initial commit 8 years ago
DESCRIPTION pkg rename 8 years ago
NAMESPACE pkg rename 8 years ago
NEWS.md initial commit 8 years ago
README.Rmd pkg rename 8 years ago
README.md pkg rename 8 years ago
wand.Rproj pkg rename 8 years ago

README.md

wand : Retrieve 'Magic' Attributes from Files and Directories

The libmagic library must be installed and available to use this. The package should also be pretty straightforward to get working on Windows. Assistance to do that is welcome.

The following functions are implemented:

  • incant : returns the "magic" metadata of the files in the input vector (as a data frame)

The following data sets are included:

  • (eventually will be an internal mime types db)

Installation

devtools::install_github("hrbrmstr/wand")

Usage

library(wand)
library(magrittr)
library(dplyr)

system.file("img", package="wand") %>% 
  list.files(full.names=TRUE) %>% 
  incant() %>% 
  glimpse()
## Observations: 10
## Variables: 5
## $ file        <chr> "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/wand/img/example_dir", "/Librar...
## $ mime_type   <chr> "inode/directory", "text/x-c", "text/html", "text/plain", "text/rtf", "image/jpeg", "applicatio...
## $ encoding    <chr> "binary", "us-ascii", "us-ascii", "us-ascii", "us-ascii", "binary", "binary", "binary", "us-asc...
## $ extensions  <chr> NA, "???", "???", "???", "???", "jpeg/jpg/jpe/jfif", "???", "???", "???", "???"
## $ description <chr> "directory", "C source, ASCII text", "HTML document, ASCII text, with CRLF line terminators", "...
# current verison
packageVersion("wand")
## [1] '0.1.0'

Test Results

library(wand)
library(testthat)

date()
## [1] "Fri Aug 12 21:41:40 2016"
test_dir("tests/")
## testthat results ========================================================================================================
## OK: 0 SKIPPED: 0 FAILED: 0
## 
## DONE ===================================================================================================================