ls_standardize_dates()
was introduced and applied by default in ls_responses()
and ls_export()
to standardize date columns to Date
class with H:M:S format.This release fixes a minor regression in schola_barplot()
introduced by {ggplot2}
3.5.0+ and provides compatibility for older LimeSurvey installations.
schola_barplot()
are drawn for all response categories even if not present in the data by default. See the blogpost and the schola_barplot()
's show.legend
argument documentation for more details.ls_login()
now works with older LimeSurvey versions (@petrbouchal, #103).This is a hotfix to align LS API with LS 6.x.
ls_login()
parameters reflect those in LS RC API..tex
template was fixed and updated (with the default .Rmd
skeleton), this may break projects using the default template
biblatex
with a standard APA (v7) styleschola_barplot()
puts the legend to the bottom by default nowtheme_schola()
now adds 1pt left and bottom margins, so the text is not cut]
untouchedschola_barplot()
gains a new argument fill_cols
, so you can override the default palette (RColorBrewer::brewer.pal(5, "RdYlBu")
, which is suitable only for 5point scales)schola_barplot()
now understands escape_level = FALSE
in which case the grey color is not used as they are no escape level or category to markschola_barplot()
now ignores NA
s in a "pairwise" manner, without completely discarding the compromised row. Turn this behavior off with drop_na = FALSE
.schola_barplot()
gains a new argument drop
. When FALSE
(the default), the levels that are actually not in the data are presented in the legend anyway.theme_schola()
plot enlarged from 1.5 pt to 4 pt to "include" Czech accents like in capital Ř
theme_schola()
now dictates that the title, subtitle, and caption is rendered via ggtext::element_textbox_simple()
- this provides automatic wrapping to the actual with of the viewport (NOTE: under R 4.2.0, you need gridtext
of version > 0.1.4, or the text will be ill-rendered; see this PR), the caption will be in condensed typeface and in greytheme_schola()
puts 6 pt bottom-margins on title and subtitleschola_barplot()
item (facet) label text is slightly bigger, default wrap-width is wider (this does not support auto-wrapping due to some bugs in ggplot2
)schola_labeller()
understands width = NULL
plot_lollipop()
group
argument is now respected in the whole schola_barplot()
ls_get_attrs()
no longer fails (even if unexpected output is returned by LS)recover_labs()
has relaxed assumptions about old and new dataframes column names and number of columns. From now on, only a warning is issued.fct_nanify()
will not abort when the factor to NAnify is not present in the data and will return the original input with a warning.Rprofile
is now sourced in project's .Rprofile
, so you may still use functions or values defined in the user-scoped versionextract_schola_barplot_info()
for easy access to a data underlying schola_barplot()
outputfct_nanify()
no longer fails when there are NA
s in the match vectorczech_date_interval()
is hopefully finally fixed...This is a minor patch solving the following two issues:
fct_nanify()
no longer warns about level order each time it is calledrecover_labs()
does not check the number of rows of dataframes (too restrictive & not intended originally)This release is focused on the new SCHOLA EMPIRICA visual style and replaces Roboto with Ubuntu font. It also adds wrappers for creating the Schola-styled lollipop and barplot plots to be used in our reports. These come with a bunch of utils, such as custom labeller which is useful for labeling plots' facets, tightly tied with dict_from_data()
that you'll use for extracting labeling specifications from the labels that come from LimeSurvey via our API. In case of labels being stripped from the dataframe, the new recover_labs()
function may be handy. As usual many bugs were fixed and a few utils functions were added. Take a look:
{reschola}
now adheres to SCHOLA EMPIRICA visual style by adopting Ubuntu and Ubuntu Condensed fontsgd_download_folder()
now overwrites existing content by default.Rprofile
at project set-up is now automatically trimmed and all queries that might boggle {googledrive}
are removedfct_nanify()
now matches using a regular expression, friendly message displaying only once per sessionshare.R
is removed for future projects, as it is now governed by a feature introduced in {reschola}
0.4.0schola_barplot()
for Likert-type items, displaying grouped data per variable for straightforward comparisonprepare_lollipop_data()
and plot_lollipop()
for creating lollipop plotsdict_from_data()
extracts named character vector of item code-label pairsschola_labeller()
is a labeller for {ggplot2}
facets that utilizes item labels, with wrappingwith_clr()
creates text with color as a span HTML tag, especially useful shortcut when you use ggtext::geom_richtext()
or ggtext::element_markdown()
richtextbuild_all.R
script now comes with a few lines that'll process all scripts inside data
directoryrecover_labs()
for recovering lost variable labels (such as those coming from ls_*()
export functions); with infix operator available: %labs_from%
get_labs_df()
for quick labels check (the most user-friendly is to use View()
in RStudio, though)remove_empty_at()
to drop observations that are completely empty at specified variables; note tidyr::drop_na()
have a similar usage, but it drops rows containing any missing values, not those with all missingspdfcrop
and ghostscript
. It is now off by default.theme_schola()
now uses 1.5pt top margin, so diacritics of certain letters doesn't get cut.clean_labels = FALSE
in ls_responses()
(and fellows) does not fail anymoreczech_date_interval()
now returns correct class (should have always been czech_date_interval
not character
; furthemore, if start and end dates were identical, it even returned POSIXct
/POSIXt
, which produced hard-to-debug issues when used inside {dplyr}
's summarise
)ls_*()
functions (those are coded NA
in recent LimeSurvey); more verbose infogd_get_proj()
now provides instruction for those who want to use the feature but created their {reschola}
project before version 0.4.0In this release, we have changed a standard project structure to be more organised keeping in mind not to clutter the project's root directory with too many files. Next, font installation and usage backend was completely revamped and should now work straight out of the box on any machine – without any dependencies needed. Last, but not least, our default {ggplot2}
theme has been report-first tailored and cropping utilities are not needed any more. And as usual, many bugs were fixed.
install_reschola_fonts()
and register_reschola_fonts()
theme_schola()
margin
supersedes margin_side
and margin_bottom
)axis.title
renamed to axis_title
)ghostscript
and pdfcrop
is defunct, so those are no longer needed (see above).Rprofile
as a hidden object that can be accessed by gd_get_proj()
draft_pdf()
set_reschola_ggplot_fonts()
without dependencies and more customisable (although changes are not recommended); new geoms coveredfct_nanify()
for recoding a factor level to NA
get_input_data()
get_intermediate_data()
get_processed_data()
write_input_data()
write_intermediate_data()
write_processed_data()
gd_upload_file()
for quick file uploadsgd_download_folder()
now uses project's Google Drive URL stored in .Rprofile
as folder_url
argument by defaultls_participants()
runs properly when there are no attributes to translate and translate_attrs = TRUE
{pkgdown}
online documentation leverages Bootstrap 5
babel
TeX package hyphenation warning mitigation in schola_pdf()
(using tinytex::tlmgr_install("hyphen-czech")
)?theme_schola
enumerates ...
arguments that theme()
understandsredoc
reversible Word format is now completely removed from the package; from now on, use schola_pdf()
primarily (schola_word()
is still available)czech_date_interval()
now raises an error when you try to supply more than one entryls_call()
gives an error when you try to provide another sSessionKey
in params
ls_call()
passes error
message to the user when there is onels_call()
replaces NULL
s with NA
s (thus more API responses can be turned into a tibble)ls_call()
messaging is less disruptiveimport_fonts()
checks that everything went well; solutions are provided otherwisels_responses()
(and thus ls_export()
) strips out the tibble
-wide variable.labels
attribute and spreads it among the individual variables, which enables you to modify the tibble
without messing the labels positions and/or producing length incompatibilitiesls_export()
gains new argument clean_labels
which by default cleans up repeating parts of labels of sub-questions (i.e., those outside square brackets)ls_set_participant_properties()
enabling you to set or edit participant tablecopy_schola_template()
which copies the template (pdf
by default) into the active project directoryczech_date_interval()
now correctly suppresses redundant informationRttf2pt1
utility that the process rely onA tiny patch release resolving the issues with and simplifying the font installation process.
import_fonts()
reschola
and are not resourced from hrbrthemes
any moreimport_fonts()
is now more verbose on the instructionreschola
font directory is now opened automaticallyimportFrom
declarationsbuild.R
is renamed to build_all.R
, to allow multiple build scripts (pro tip: use {buildr} package)new R Markdown document format schola_pdf()
:
report
classcairo
device so non-ASCII characters are well supported) and are cropped automatically (new function ensure_cropping()
that checks for dependencies needed for proper format functioning, providing help when an issue is discovered)pandoc
Lua filter (only repo fork currently, thanks Delanii)author
Pandoc variable (used in YAML header), which takes the language lang
and automatically typesets the "and" or "a" separator before the last author (when there is only one, no separators are introduced whatsoever)reschola
is now armed with its own LimeSurvey API interface, providing several functions tailored to our needs:
ls_call()
implements general and fully customisable call to the API (you must adhere to the documentation)ls_export()
is going to be used most of the time, as it fetches both participants and their responses, it basically merges outputs from ls_participants()
, and ls_responses()
ls_login()
is used for manual session key request; it may be never used directly, as every ls_
call ensures the key is cached and not expired (key is stale after 2 hrs)ls_add_participants()
inserts one or more participants to the LimeSurvey databasels_invite()
sends an email invitation prepared in LimeSurvey web interface to the selected participantsls_get_attrs()
for retrieval of the custom survey attributes and their "semantic" form (i.e. human-readable description)new class czech_date
with S3 method that prints the date in long format and with grammatically correct case, more in as_czech_date()
new function czech_date_interval()
that takes two dates and returns nicely formatted Czech date interval
pandoc
outputs to LaTeX
(i.e., schola_pdf()
format is used)new function compile_and_open()
provides safe and comfortable way to render/compile .Rmd
documents
vector graphics logo of SCHOLA EMPIRICA in .pdf
added
development feature: spellcheck on package introduced via usethis
99_reproducibility.Rmd
now uses base R sessionInfo()
, not sessioninfo
package, which seems like an unnecessary dependencyggplot2::ScaleContinuousPosition
correctly imported, but still WIPls_participants()
handles attributes correctly when used as a character vectorschola_word()
schola_word2()
deprecatedschola_word()
, which now uses default template if no reference document is provided in YAMLpandoc lua
filter for quotation marks integrated into Word template`r rnorm(1)`
)theme_schola
is set to default in rmarkdown
skeletonbuild.R
fixed (#79)lifecycle
package introducedtheme_schola()
works again with manage_docx_header_logos()
and comes with SCHOLA EMPIRICA logo preloadedschola_word2()
, with a link to bookdown
manualschola_word2()
gives the user control over the reference Word document (a.k.a. template), open_schola_word_template
automatically locates and opens up the aforementioned template that comes with the package to simplify and speed up the work with the templatetheme_schola
now uses the same colour everywhere (caption colour was in solid black)scale_[x|y]_percent_cz()
, scale_[x|y]_number_cz()
hrbrthemes
: scale_[x|y]_comma()
and scale_[x|y]_percent()
label_number_cz()
and label_percent_cz()
(the English-language analogues without _cz
are in the package scales
)margin_bottom
param to theme_schola()
left_margin
to margin_left
in theme_schola()
data-raw
and data-processed
such that the directories can go into git but not its contents; documentation explains this in multiple places.draft_redoc()
no longer leaves behind a stray docx filedraft_redoc()
now works outside of a reschola-created projectdata-processed
directory001_read-data.R
.data-input
and data-processed
directories in new project are now automatically added to .gitignore
draft_redoc()
to fix round-tripping issue and improve UIdrat
repo link in README so install.packages()
no longer failsgd_download_folder()
function for downloading all files in a GDrive folderfont_rc_light
as Roboto Condensed Light does not work in Windows with ggplot2import_fonts()
manage_docx_header_logos()
function for adding/replacing logos in Word docs created using reschola templatestheme_schola()
+ functions for font import and setting geom_*
defaultstheme_schola()
doctheme_schola()
added for early feedback, together with vignettetips.html
vignettemeta.html
vignette on developing this packagecharts.html
vignette to get around missing fonts on Travisredoc
which fixes addin error and an error in documentationNEWS.md
file to track changes to the package.