Skip to content

Commit

Permalink
Merge pull request #24 from Jean-Baptiste-Camps/packaging
Browse files Browse the repository at this point in the history
Packaging
  • Loading branch information
floriancafiero authored Oct 26, 2017
2 parents d8683f1 + a29a3e0 commit a5828fa
Show file tree
Hide file tree
Showing 39 changed files with 543 additions and 440 deletions.
7 changes: 7 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
^README\.Rmd$
^README-.*\.png$
^\.travis\.yml$
^codecov\.yml$
\.Rhistory
\.gitignore
\.git
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.Rhistory
inst/doc
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
sudo: false
cache: packages

warnings_are_errors: false #Modify once warnings are solved. Added temporarily 20171025

after_success:
- Rscript -e 'covr::codecov()'
12 changes: 10 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ Date: 2014-07-16
Author: Jean-Baptiste Camps ; Florian Cafiero
Maintainer: Jean-Baptiste Camps <jbcamps@hotmail.com>
Description: This package helps building and analysing the genealogy of textual or musical traditions.
Imports: network, sna, cluster
Suggests:
BugReports: https://github.com/Jean-Baptiste-Camps/stemmatology/issues
Imports: graphics, stats, utils, network, sna, cluster
Suggests:
testthat,
knitr,
rmarkdown,
covr
License: CC BY-NC-SA 2.0
NeedsCompilation: no
URL: https://github.com/Jean-Baptiste-Camps/stemmatology
VignetteBuilder: knitr
RoxygenNote: 6.0.1
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
exportPattern("^[[:alpha:]]+")
importFrom("graphics", "axis", "barplot", "legend", "par", "plot")
importFrom("stats", "fisher.test", "na.omit")
importFrom("utils", "read.csv")
importFrom("sna", "gplot", "gplot.layout.fruchtermanreingold")
importFrom("network", "as.network", "network.vertex.names", "as.matrix.network", "set.vertex.attribute", "get.vertex.attribute")
importFrom("cluster", "pam")
2 changes: 1 addition & 1 deletion R/PCC.conflicts.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ PCC.conflicts <-
# ".C" 0.46 0.89 0.46 0.89
#
options(stringsAsFactors = FALSE) # Option to avoid using factor and gaining efficiency
#tableVariantes = as.matrix(x)
# Perhaps better to do:
if (!is.matrix(x)) {
stop("Please input a matrix")
}
tableVariantes = x
#TODO(JBC):
# Initial test to verify if the input is what it is supposed to be
if (!is.numeric(tableVariantes) & alternateReadings == FALSE) {
Expand Down
13 changes: 0 additions & 13 deletions R/incrementTable.R

This file was deleted.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# stemmatology : an R stemmatology package

[![Travis-CI Build Status](https://travis-ci.org/Jean-Baptiste-Camps/stemmatology.svg?branch=master)](https://travis-ci.org/Jean-Baptiste-Camps/stemmatology)
[![Coverage Status](https://img.shields.io/codecov/c/github/Jean-Baptiste-Camps/stemmatology/master.svg)](https://codecov.io/github/Jean-Baptiste-Camps/stemmatology?branch=master)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/stemmatology)](https://cran.r-project.org/package=stemmatology)

Version: 0.2.2 (pre-alpha)
Date: 2014-07-16
Author: Jean-Baptiste Camps ; Florian Cafiero
Expand All @@ -9,3 +13,12 @@

This repository contains the source file of the development version for the project of a stemmatology package for R. This package will contain functions for the PCC method as described in Jean-Baptiste Camps And Florian Cafiero, « Genealogical Variant Locations And Simplified Stemma: A Test Case », 2014, as well as other stemmatological methods (see roadmap at https://graal.hypotheses.org/925).

## Installation

You can install stemmatology from Github with:

```r
# install.packages("devtools")
devtools::install_github("Jean-Baptiste-Camps/stemmatology")
```

1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
18 changes: 8 additions & 10 deletions man/Import.TEIApparatus.Rd
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
\encoding{utf8}
\name{Import.TEIApparatus}
\alias{Import.TEIApparatus}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Import TEI apparatus
}
\description{
Allows the user to import a TEI document.
}
\title{Import TEI apparatus}
\description{Allows the user to import a TEI encoded parallel-segmentation apparatus.}
\usage{
Import.TEIApparatus(file = x, fromCollatex = False)
Import.TEIApparatus(file = x, fromCollatex = FALSE)
}
%- maybe also 'usage' for other objects documented here.

\arguments{
\item{file}{
Adress of valid TEI file.
Expand All @@ -29,11 +26,12 @@ Default: \code{false}
%% \item{comp2 }{Description of 'comp2'}
%% ...
}
\references{
%\references{
%}

\author{
Jean-Baptiste Camps (\email{jbcamps@hotmail.com}) & Florian Cafiero(\email{florian.cafiero@polytechnique.edu})
}


\keyword{TEI }
\keyword{TEI}
5 changes: 3 additions & 2 deletions man/PCC.Exploratory.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.Exploratory}
\alias{PCC.Exploratory}
\title{PCC Exploratory methods}
Expand Down Expand Up @@ -56,8 +57,8 @@ Jean-Baptiste Camps (\email{jbcamps@hotmail.com}) & Florian Cafiero
%% ~~objects to See Also as \code{\link{help}}, ~~~
}
\examples{
load(fournival)
PCC.Exploratory(fournival)
data(fournival)
%PCC.Exploratory(fournival)
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
Expand Down
5 changes: 3 additions & 2 deletions man/PCC.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC}
\alias{PCC}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down Expand Up @@ -71,8 +72,8 @@ Jean-Baptiste Camps (\email{jbcamps@hotmail.com}) & Florian Cafiero(\email{flori
\code{\link{PCC.Exploratory}}, \code{\link{PCC.Stemma}}.
}
\examples{
load(fournival)
PCC(fournival)
%data(fournival)
%PCC(fournival)
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
Expand Down
3 changes: 2 additions & 1 deletion man/PCC.Stemma.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.Stemma}
\alias{PCC.Stemma}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down Expand Up @@ -53,7 +54,7 @@ Jean-Baptiste Camps (\email{jbcamps@hotmail.com}) & Florian Cafiero (\email{flor
%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
\code{\link{PCC.disagreement}}, \code{\link{PCC.buildgroup}}, \code{\link{PCC.reconstructModel}}.
\code{\link{PCC.disagreement}}, \code{\link{PCC.buildGroup}}, \code{\link{PCC.reconstructModel}}.
}
\examples{

Expand Down
1 change: 1 addition & 0 deletions man/PCC.buildGroup.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.buildGroup}
\alias{PCC.buildGroup}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down
9 changes: 5 additions & 4 deletions man/PCC.conflicts.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.conflicts}
\alias{PCC.conflicts}
\title{PCC Exploratory Methods: Conflicts between Variant Locations}
Expand Down Expand Up @@ -55,12 +56,12 @@ Jean-Baptiste Camps (\email{jbcamps@hotmail.com}) & Florian Cafiero
}
\examples{
%TODO: fignoler globalement les exemples et les reprendre, voire les affiner.
load(fournival)
data(fournival)
myConflicts = PCC.conflicts(fournival)
myOverconflicting = PCC.overconflicting(myConflicts)
myNewVariantsTable = PCC.elimination(myOverconflicting)
%myOverconflicting = PCC.overconflicting(myConflicts)
%myNewVariantsTable = PCC.elimination(myOverconflicting)
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{stemmatology}
\keyword{philology}
%\keyword{philology}
1 change: 1 addition & 0 deletions man/PCC.contam.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.contam}
\alias{PCC.contam}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down
1 change: 1 addition & 0 deletions man/PCC.disagreement.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.disagreement}
\alias{PCC.disagreement}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down
5 changes: 3 additions & 2 deletions man/PCC.distribute.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.distribute}
\alias{PCC.distribute}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down Expand Up @@ -50,5 +51,5 @@ Jean-Baptiste Camps & Florian Cafiero
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ ~kwd1 }
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
\keyword{stemmatology}
\keyword{data-manipulation}%vérif keywords
6 changes: 2 additions & 4 deletions man/PCC.elimination.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.elimination}
\alias{PCC.elimination}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down Expand Up @@ -43,7 +44,4 @@ To spot the conflicts between variants: \code{\link{PCC.conflicts}}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{over-conflicting}
\keyword{variants}% __ONLY ONE__ keyword per line
\keyword{selection}
\keyword{deletion}
\keyword{stemmatology}
1 change: 1 addition & 0 deletions man/PCC.equipollent.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.equipollent}
\alias{PCC.equipollent}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down
5 changes: 3 additions & 2 deletions man/PCC.overconflicting.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.overconflicting}
\alias{PCC.overconflicting}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand Down Expand Up @@ -40,11 +41,11 @@ Jean-Baptiste Camps (\email{jbcamps@hotmail.com}) & Florian Cafiero
%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
\code{\link{PCC.Exploratory},
\code{\link{PCC.Exploratory}},
%About the input for this fonction :
\code{\link{PCC.conflicts}},
%To remove the variants labeled as problematic:
\code{\link{PCC.elimination}}.}
\code{\link{PCC.elimination}}.
}
\examples{
}
Expand Down
18 changes: 12 additions & 6 deletions man/PCC.reconstructModel.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{PCC.reconstructModel}
\alias{PCC.reconstructModel}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand All @@ -19,11 +20,12 @@ A PCCbuildGroup object.

Default: \code{FALSE}.
}
\item{limit}{
The maximum number of severe disagreements expected for witnesses to be in the same group.

Default: \code{0}.
}
% \item{limit}{
%The maximum number of severe disagreements expected for witnesses to be in the same group.
%
% Default: \code{0}.
%}
%TODO: faut-il implementer qqchose de ce genre pour cette fonction?
\item{recoverNAs}{
logical; if \code{TRUE}, when an actual witness or reconstructed subarchetype is identified to the reconstructed model of a group, every NA it has is recovered by taking the value of the reconstructed model; if \code{FALSE}, their NAs values are kept.

Expand Down Expand Up @@ -56,7 +58,11 @@ Jean-Baptiste Camps (\email{jbcamps@hotmail.com}) & Florian Cafiero

%% ~Make other sections like Warning with \section{Warning }{....} ~

\examples{

}

\seealso{
More about the next step: \code{\link{PCC.stemma}}.
More about the next step: \code{\link{PCC.Stemma}}.
More about the input: \code{\link{PCC.buildGroup}}
}
5 changes: 3 additions & 2 deletions man/VL.pValues.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{VL.pValues}
\alias{VL.pValues}
%- Also NEED an '\alias' for EACH other topic documented here.
Expand All @@ -15,7 +16,7 @@ VL.pValues(x)
}
}
\details{
In order to assess the signicance of each variant location, and distinguish
In order to assess the significance of each variant location, and distinguish
random polygenesis from contamination (i.e. copying based on several exemplars), this function crosses two by two every possible pair of variant locations, and applies a Fisher exact test. It then counts the number of configurations in which a VL has passed the significance threshold (i.e. p < 0.05).
}
\value{
Expand All @@ -36,7 +37,7 @@ Jean-Baptiste Camps
%% ~~further notes~~
%}

\warning{This function is still in active development.}
\note{This function is still in active development.}

%% ~Make other sections like Warning with \section{Warning }{....} ~

Expand Down
1 change: 1 addition & 0 deletions man/fournival.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{fournival}
\alias{fournival}
\docType{data}
Expand Down
4 changes: 1 addition & 3 deletions man/heinrichi.Rd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\encoding{utf8}
\name{heinrichi}
\alias{heinrichi}
\docType{data}
Expand Down Expand Up @@ -59,9 +60,6 @@ Roos, Teemu, Heikkilä, Tuomas, and Myllymäki, Petri, « Computer-Assisted Ste
\references{
Camps (Jean-Baptiste) & Cafiero (Florian), « Genealogical variant locations and simplified stemma: a test case », in Analysis of Ancient and Medieval Texts and Manuscripts: Digital Approaches, ed. Tara Andrews & Caroline Macé, Turnhout: Brepols, 2015, p. 6993 (Lectio, 1), \url{http://dx.doi.org/10.1484/M.LECTIO-EB.5.102565}.
}
\references{
Camps (Jean-Baptiste) & Cafiero (Florian), « Genealogical variant locations and simplified stemma: a test case », in Analysis of Ancient and Medieval Texts and Manuscripts: Digital Approaches, ed. Tara Andrews & Caroline Macé, Turnhout: Brepols, 2015, p. 6993 (Lectio, 1), \url{http://dx.doi.org/10.1484/M.LECTIO-EB.5.102565}.
}
\examples{
data(heinrichi)
}
Expand Down
Loading

0 comments on commit a5828fa

Please sign in to comment.