Running examples in ‘findInGit-Ex.R’ failed
The error most likely occurred in:

> ### Name: findInGit
> ### Title: Find pattern in files of a 'git' repository
> ### Aliases: findInGit
> 
> ### ** Examples
> 
> library(findInGit)
> library(R.utils) # to use the `copyDirectory` function
Loading required package: R.oo
Loading required package: R.methodsS3
R.methodsS3 v1.8.1 (2020-08-26 16:20:06 UTC) successfully loaded. See ?R.methodsS3 for help.
R.oo v1.24.0 (2020-08-26 16:11:58 UTC) successfully loaded. See ?R.oo for help.

Attaching package: ‘R.oo’

The following object is masked from ‘package:R.methodsS3’:

    throw

The following objects are masked from ‘package:methods’:

    getClasses, getMethods

The following objects are masked from ‘package:base’:

    attach, detach, load, save

R.utils v2.10.1 (2020-08-26 22:50:31 UTC) successfully loaded. See ?R.utils for help.

Attaching package: ‘R.utils’

The following object is masked from ‘package:utils’:

    timestamp

The following objects are masked from ‘package:base’:

    cat, commandArgs, getOption, inherits, isOpen, nullfile, parse,
    warnings

> folder1 <- system.file("htmlwidgets", package = "findInGit")
> folder2 <- system.file("htmlwidgets", "lib", package = "findInGit")
> tmpDir <- paste0(tempdir(), "_gitrepo")
> dir.create(tmpDir)
> # set tmpDir as the working directory
> cd <- setwd(tmpDir)
> # copy folder1 in tmpDir
> copyDirectory(folder1, recursive = FALSE)
> # initialize git repo
> system("git init")
sh: git:  not found
Warning in system("git init") : error in running command
> # add all files to git
> system("git add -A")
sh: git:  not found
Warning in system("git add -A") : error in running command
> # commit files
> system('git commit -m "mycommit1"')
sh: git:  not found
Warning in system("git commit -m \"mycommit1\"") :
  error in running command
> # create a new branch
> system("git checkout -b newbranch")
sh: git:  not found
Warning in system("git checkout -b newbranch") :
  error in running command
> # copy folder2 in tmpDir, under the new branch
> copyDirectory(folder2, recursive = FALSE)
> # add all files to git
> system("git add -A")
sh: git:  not found
Warning in system("git add -A") : error in running command
> # commit files
> system('git commit -m "mycommit2"')
sh: git:  not found
Warning in system("git commit -m \"mycommit2\"") :
  error in running command
> 
> # now we can try `findInGit`
> 
> # get results in a dataframe:
> 
> # one can also get the widget and the dataframe:
> fig <- findInGit(ext = "css", pattern = "color", output = "viewer+dataframe")
This package requires the 'git' system command.
> fig
NULL
> FIG2dataframe(fig)
Error in FIG2dataframe(fig) : 
  The `fig` argument is not a output of `findInGit`.
Execution halted