pikchr

R wrapper for pikchr language

https://github.com/strategicprojects/pikchr

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

R wrapper for pikchr language

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```


# pikchr pikchr website


![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/pikchr)   
![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/pikchr)   
![](https://img.shields.io/badge/devel%20version-1.0.0-blue.svg)

  
  
  Welcome to the `pikchr` package website, an R interface for the **PIC diagramming language**, powered by the parser from . The `pikchr` package allows you to create diagrams directly within R, combining simplicity and precision for efficient diagram generation.

With `pikchr`, you can produce complex diagrams for documentation, presentations, articles, and more, all from your R environment. The straightforward nature of the **PIC language**, paired with the power of R, makes this package a valuable tool for those needing precise, customizable visualizations in academic, technical, and scientific projects. Discover how `pikchr` can enhance and streamline your diagramming workflow!
  
  ## Installation
  
  You can install directly from CRAN or the development version of pikchr from [GitHub](https://github.com/) with:
  
  ```r
# install.packages("pak")
pak::pak("StrategicProjects/pikchr")
```

```{r, echo=TRUE, eval=FALSE}
library(pikchr)

pikchr('
/*
basic example code
*/
arrow right 200% "Rmarkdown" "Source" # teste
box rad 10px "Rmarkdown" "(knitr)" bold  fit
arrow right 200% "HTML+SVG" "Output" 
arrow <-> down from last box.s
box same "Pikchr" "(pikchr.c)" bold fit
',
       width = "75%", 
       height = "auto",
       fontSize = '75%',
       fontFamily = "Flamenco")
```

```{r, echo=FALSE, fig.align='center'}
library(pikchr)

pikchr('
/*
basic example code
*/
arrow right 200% "Rmarkdown" "Source" # teste
box rad 10px "Rmarkdown" "(knitr)" bold  fit
arrow right 200% "HTML+SVG" "Output" 
arrow <-> down from last box.s
box same "Pikchr" "(pikchr.c)" bold fit
',
       width = "75%",
       height = "auto",
       fontSize = "75%",
       fontFamily = "Flamenco", 
       svgOnly = TRUE)
```


You can also use the `{pikchr}` engine in a `Rmarkdown` document.

````{verbatim}
```{pikchr}
#| width: 50%
#| height: auto
#| align: center
#| fontSize: 14
#| fontFamily: Jost
/*
  basic example code in a markdown chunk.
*/
  arrow right 200% "Rmarkdown" "Source" # teste
box rad 10px "Rmarkdown" "(knitr)"  fit fill 0xEE964B
arrow right 200% "HTML+SVG" "Output" 
arrow <-> down from last box.s
box same "Pikchr" "(pikchr.c)" fit fill 0xF4D35E
```
````


```{pikchr}
#| echo: false
#| width: 50%
#| height: auto
#| align: center
#| fontSize: 14
#| fontFamily: Jost
/*
  basic example code in a markdown chunk.
*/
  arrow right 200% "Rmarkdown" "Source" # teste
box rad 10px "Rmarkdown" "(knitr)"  fit fill 0xEE964B
arrow right 200% "HTML+SVG" "Output" 
arrow <-> down from last box.s
box same "Pikchr" "(pikchr.c)" fit fill 0xF4D35E
```


```{pikchr}
#| echo: true
#| width: 25%
#| height: auto
#| align: center
#| fontSize: 50%
#| fontFamily: MonteCarlo

lgt = .2

define hex_up { 
    A:line right $1*(sqrt(3)/2) down $1/2 \
        then down $1 \
        then down $1/2 left $1*(sqrt(3)/2) \
        then up $1/2 left $1*(sqrt(3)/2) \
        then up $1 \
        then right $1*(sqrt(3)/2) up $1/2 \
        close color $3 fill $4
    text $2 at last .c color $5
}

define hex_dgr {
   P:(0,0)
   C1: circle rad .01 with .c at P.c thin color $2
   C2: circle rad .01 with .c at C1.c + ($1*(sqrt(3)/2), -$1/2) thin color $2
   C3: circle rad .01 with .c at C2.c + (0, -$1) thin  color $2
   C4: circle rad .01 with .c at C3.c + (-$1*(sqrt(3)/2), -$1/2) thin color $2
   C5: circle rad .01 with .c at C4.c + (-$1*(sqrt(3)/2), $1/2) thin color $2
   C6: circle rad .01 with .c at C5.c + (0, $1) thin color $2
   L1: line from C1.se to C2.nw thin color $2
   L2: line from C2.s to C3.n thin color $2
   L3: line from C3.sw to C4.ne thin color $2
   L4: line from C4.nw to C5.se thin color $2
   L5: line from C5.n to C6.s thin color $2
   L6: line from C6.ne to C1.sw thin color $2
   
}


H2: [hex_up(lgt ,  "Pikchr" small, 0x196F3D, 0x27AE60, white)]
H3: [hex_dgr(lgt*.8, 0x7DCEA0)] with .c at H2.c
H4: [hex_dgr(lgt*.6, 0x52BE80)] with .c at H2.c
```

Owner

  • Name: Secretaria de Projetos Estratégicos
  • Login: StrategicProjects
  • Kind: organization
  • Email: andre.leite@sepe.pe.gov.br
  • Location: Brazil

GitHub Events

Total
  • Release event: 1
  • Delete event: 9
  • Push event: 48
  • Create event: 10
Last Year
  • Release event: 1
  • Delete event: 9
  • Push event: 48
  • Create event: 10

Packages

  • Total packages: 1
  • Total downloads:
    • cran 525 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: pikchr

R Wrapper for 'pikchr' (PIC) Diagram Language

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 525 Last month
Rankings
Dependent packages count: 28.1%
Dependent repos count: 34.6%
Average: 49.8%
Downloads: 86.6%
Maintainers (1)
Last synced: 10 months ago