Skip to content

Commit

Permalink
MarkdownReportsDev is new discontinued.
Browse files Browse the repository at this point in the history
Further development will be implemented here, in MarkdownReports. MarkdownReportsDev was made when big changes were happening. The development reached its main goals.
  • Loading branch information
vertesy committed Oct 31, 2021
1 parent 88c5083 commit 8083aa9
Show file tree
Hide file tree
Showing 111 changed files with 5,924 additions and 1,244 deletions.
24 changes: 12 additions & 12 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Package: MarkdownReports
Title: Generate Scientific Figures and Reports Easily
Version: 4.1.0
Version: 4.3.2
Authors@R:
person(given = "Abel",
family = "Vertesy",
role = c("aut", "cre"),
email = "a.vertesy@hubrecht.eu")
Author: Abel Vertesy <a.vertesy@hubrecht.eu> [aut, cre]
Description: MarkdownReports is a set of R functions that allows
you to generate precise figures easily, and create clean markdown
reports about what you just discovered with your analysis script. It
helps you to: 1. Create scientifically accurate (annotated) figures
with very short code, making use of variable-, row- and columnnames.
2. Save figures automatically as vector graphic (.pdf), that you can
use from presentation to posters anywhere. 3. Incorporate your
figures automatically in a markdown report file. 4. Describe your
figures & findings in the same report in a clear and nicely formatted
way, parsed from your variables into english sentences. 5. Share your
Description: MarkdownReports is a set of R functions that allows you to
generate precise figures easily, and create clean markdown reports
about what you just discovered with your analysis script. It helps you
to: 1. Create scientifically accurate (annotated) figures with very
short code, making use of variable-, row- and columnnames. 2. Save
figures automatically as vector graphic (.pdf), that you can use from
presentation to posters anywhere. 3. Incorporate your figures
automatically in a markdown report file. 4. Describe your figures &
findings in the same report in a clear and nicely formatted way,
parsed from your variables into english sentences. 5. Share your
report, by exporting your report to .pdf, .html or .docx, or via
Github or a personal website.
License: GPL-3 + file LICENSE
Expand All @@ -36,7 +36,7 @@ Imports:
vioplot
Encoding: UTF-8
LazyData: true
Packaged: 2020-12-16 11:20:44
Packaged: 2021-10-31 15:03:27
Repository: CRAN
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
Binary file not shown.
120 changes: 120 additions & 0 deletions Development/Create_the_MarkdownReports_Package.v4.3.2.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
######################################################################################################
# Workflow_to_Create_an_R_Package.R
# 3- Oct 2021
######################################################################################################
# source("~/GitHub/Packages/MarkdownReports/Development/Create_the_MarkdownReports_Package.v4.3.2.R")
rm(list = ls(all.names = TRUE));
try(dev.off(), silent = TRUE)

# install.packages("devtools")
# Functions ------------------------
# devtools::install_github(repo = "vertesy/MarkdownReports/MarkdownReports")
try (source('~/GitHub/Packages/CodeAndRoll/CodeAndRoll.R'),silent= FALSE)

# irequire("devtools")
# install_version("devtools", version = "2.0.2", repos = "http://cran.at.r-project.org")
irequire("devtools")
irequire("roxygen2")
irequire("stringr")

kollapse <-function(..., print = TRUE) {
if (print == TRUE) {
print(paste0(c(...), collapse = ""))
}
paste0(c(...), collapse = "")
}

# Setup ------------------------
PackageName = "MarkdownReports"
setwd("~/GitHub/")

RepositoryDir = kollapse("~/GitHub/Packages/", PackageName, "/")
fname = kollapse(PackageName, ".R")
Package_FnP = kollapse(RepositoryDir, "R/", fname)

BackupDir = "~/GitHub/Packages/MarkdownReports/Development/"
dir.create(BackupDir)

# devtools::use_package("vioplot")
DESCRIPTION <- list("Title" = "Generate Scientific Figures and Reports Easily"
, "Author" = person(given = "Abel", family = "Vertesy", email = "a.vertesy@hubrecht.eu", role = c("aut", "cre") )
, "Authors@R" = 'person(given = "Abel", family = "Vertesy", email = "a.vertesy@hubrecht.eu", role = c("aut", "cre") )'
, "Description" = "MarkdownReports is a set of R functions that allows you to generate precise figures easily,
and create clean markdown reports about what you just discovered with your analysis script. It helps you to:
1. Create scientifically accurate (annotated) figures with very short code, making use of variable-, row- and columnnames.
2. Save figures automatically as vector graphic (.pdf), that you can use from presentation to posters anywhere.
3. Incorporate your figures automatically in a markdown report file.
4. Describe your figures & findings in the same report in a clear and nicely formatted way, parsed from your variables into english sentences.
5. Share your report, by exporting your report to .pdf, .html or .docx, or via Github or a personal website."
, "License" = "GPL-3 + file LICENSE"
, "Version" = "4.3.2"
, "Packaged" = Sys.time()
, "Repository" = "CRAN"
, "Imports" = "stats, methods, sm, graphics, grDevices, gplots, RColorBrewer, colorRamps, clipr, vioplot, VennDiagram, sessioninfo"
# , "Suggests" = ""
, "BugReports"= "https://github.com/vertesy/MarkdownReports/issues"
)


setwd(RepositoryDir)
if ( !dir.exists(RepositoryDir) ) { create(path = RepositoryDir, description = DESCRIPTION, rstudio = TRUE)
} else {
getwd()
try(file.remove(c("DESCRIPTION","NAMESPACE", "MarkdownReports.Rproj")))
create_package(path = RepositoryDir, fields = DESCRIPTION, open = F)
}


# go and write fun's ------------------------------------------------------------------------
# file.edit(Package_FnP)

# Create Roxygen Skeletons ------------------------
# RoxygenReady(Package_FnP)

# replace output files ------------------------------------------------
BackupOldFile = kollapse(BackupDir, "Development", ".bac", print = FALSE)
AnnotatedFile = kollapse(BackupDir, "Development", ".annot.R", print = FALSE)
file.copy(from = Package_FnP, to = BackupOldFile, overwrite = TRUE)
# file.copy(from = AnnotatedFile, to = Package_FnP, overwrite = TRUE)

# Manual editing of descriptors ------------------------------------------------
# file.edit(Package_FnP)

# Compile a package ------------------------------------------------
setwd(RepositoryDir)
getwd()
document()


# Install your package ------------------------------------------------
# # setwd(RepositoryDir)
install(RepositoryDir)
# require("MarkdownReports")
# # remove.packages("MarkdownReports")
# # Test your package ------------------------------------------------
# help("wplot")
# cat("\014")
# devtools::run_examples()


# Test if you can install from github ------------------------------------------------
# devtools::install_github(repo = "vertesy/MarkdownReports")
# devtools::install_github(repo = "vertesy/MarkdownReports/MarkdownReports")
# require("MarkdownReports")

# Clean up if not needed anymore ------------------------------------------------
# View(installed.packages())
# remove.packages("MarkdownReports")

check(RepositoryDir, cran = TRUE)
# as.package(RepositoryDir)
#
#
# # source("https://install-github.me/r-lib/desc")
# # library(desc)
# # desc$set("MarkdownReports", "foo")
# # desc$get(MarkdownReports)
#
#
# system("cd ~/GitHub/MarkdownReports/; ls -a; open .Rbuildignore")
#
Loading

0 comments on commit 8083aa9

Please sign in to comment.