Package: ds4psy 1.3.0.9003

ds4psy: Data Science for Psychologists

All datasets and functions required for the examples and exercises of the book "Data Science for Psychologists" (by Hansjoerg Neth, Konstanz University, 2026, <doi:10.5281/zenodo.7229812>), freely available at <https://hneth-ds4psy.share.connect.posit.cloud/>. The book and corresponding courses introduce principles and methods of data science to students of psychology and other biological or social sciences. The 'ds4psy' package primarily provides datasets, but also functions for data generation and manipulation (e.g., of text and time data) and graphics that are used in the book and its exercises. All functions included in 'ds4psy' are designed to be explicit and instructive, rather than efficient or elegant.

Authors:Hansjoerg Neth [aut, cre]

ds4psy_1.3.0.9003.tar.gz
ds4psy_1.3.0.9003.zip(r-4.7)ds4psy_1.3.0.9003.zip(r-4.6)ds4psy_1.3.0.9003.zip(r-4.5)
ds4psy_1.3.0.9003.tgz(r-4.6-any)ds4psy_1.3.0.9003.tgz(r-4.5-any)
ds4psy_1.3.0.9003.tar.gz(r-4.7-any)ds4psy_1.3.0.9003.tar.gz(r-4.6-any)
ds4psy_1.3.0.9003.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
ds4psy/json (API)
NEWS

# Install 'ds4psy' in R:
install.packages('ds4psy', repos = c('https://hneth.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/hneth/ds4psy/issues

Datasets:

On CRAN:

Conda:

data-literacydata-scienceeducationexploratory-data-analysispsychologysocial-sciencesvisualisation

7.36 score 24 stars 63 scripts 537 downloads 67 exports 18 dependencies

Last updated from:e47f670f69. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK164
source / vignettesOK183
linux-release-x86_64OK132
macos-release-arm64OK87
macos-oldrel-arm64OK108
windows-develOK102
windows-releaseOK94
windows-oldrelOK114
wasm-releaseOK110

Exports:base_digitsbase2deccapitalizecaseflipcclasschange_timechange_tzchars_to_textcoincollapse_charscount_charscount_chars_wordscount_wordscur_datecur_timedays_in_monthdec2basedicedice_2diff_datesdiff_timesdiff_tzds4psy.guideget_setinvert_rulesis_equalis_leap_yearis_vectis_wholenumberl33t_rul35make_gridmap_text_coordmap_text_regexmetacharnum_as_charnum_as_ordinalnum_equalpal_ds4psypal_n_sqplot_charmapplot_charsplot_circ_pointsplot_fnplot_funplot_nplot_textplot_tilesread_asciisample_charsample_datesample_timetext_to_charstext_to_sentencestext_to_wordstheme_cleantheme_ds4psytheme_emptytransl33tUmlautwhat_datewhat_monthwhat_timewhat_wdaywhat_weekwhat_yearwords_to_textzodiac

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerrlangS7scalesuniknvctrsviridisLitewithr

Data Science for Psychologists (ds4psy)

Rendered fromds4psy.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2026-04-22
Started: 2019-08-04

Readme and manuals

Help Manual

Help pageTopics
Base digits: Sequence of numeric symbols (as named vector)base_digits
Convert a string of numeral digits from some base into decimal notationbase2dec
Data: BushismsBushisms
Capitalize initial characters in a string of textcapitalize
Flip the case of characters in a string of textcaseflip
cclass provides character classes (as a named vector)cclass
Change time and time zone (without changing time display)change_time
Change time zone (without changing the represented time)change_tz
Combine character inputs 'x' into a single string of textchars_to_text vec2str
Flip a fair coin (with 2 sides "H" and "T") n timescoin
Collapse character inputs 'x' into a single character stringcollapse_chars
Count the frequency of characters in a character string/textcount_chars
Count the frequency of characters and words in a character string/textcount_chars_words
Count the frequency of words in a character string/textcount_words
Data: Names of countriescountries
Get current date (in yyyy-mm-dd or dd-mm-yyyy format)cur_date
Get current time (in hh:mm or hh:mm:ss format)cur_time
Data import data_1.data_1
Data import data_2.data_2
Data table data_t1.data_t1
Data import data_t1_de.data_t1_de
Data import data_t1_tab.data_t1_tab
Data table data_t2.data_t2
Data table data_t3.data_t3
Data table data_t4.data_t4
How many days are in a month (of given date)?days_in_month
Convert an integer from decimal notation into a string of numeric digits in some basedec2base
Throw a fair dice (with a given number of sides) n timesdice
Throw a questionable dice (with a given number of sides) n timesdice_2
Get the difference between two dates (in human units)diff_dates
Get the difference between two times (in human units)diff_times
Get the time zone difference between two times.diff_tz
Open the *ds4psy* package's user guide.ds4psy.guide
Data from 10 Danish peopledt_10
Data from an experiment with numeracy and date-time variablesexp_num_dt
Data exp_wide.exp_wide
Data: False Positive PsychologyfalsePosPsy_all
Data: famefame
Data: Flowery phrasesflowery
Data: Names of fruitsfruits
Get a set of x-y coordinates (from Anscombe's Quartet)get_set
Data from the i2ds online surveyi2ds_survey
invert_rules() inverts a set of encoding rulesinvert_rules
Test two vectors for pairwise (near) equalityis_equal
Is some year a so-called leap year?is_leap_year
Test for a vector (i.e., atomic vector or list).is_vect
Test for whole numbers (i.e., integers)is_wholenumber
Rules for translating text into leet/l33t slangl33t_rul35
Generate a grid of x-y coordinates.make_grid
map_text_chars maps the characters of a text string into a table (with x/y coordinates).map_text_chars
map_text_coord maps the characters of a text string into a table (with x/y-coordinates).map_text_coord
Map text to character table (allowing for matching patterns)map_text_regex
metachar provides metacharacters (as a character vector)metachar
Convert a number into a character sequencenum_as_char
Convert a number into an ordinal character sequencenum_as_ordinal
Test two numeric vectors for pairwise (near) equalitynum_equal
Outlier data.outliers
ds4psy default color palette.pal_ds4psy
Get n-by-n dedicated colors of a color palettepal_n_sq
Data: 100k digits of pi.pi_100k
Plot a character map as a tile plot with text labelsplot_charmap
Plot text characters (from file or user input) and match patternsplot_chars
Plot objects (as points) arranged on a circleplot_circ_points
A function to plot a plotplot_fn
An example function to plot some plotplot_fun
Plot n tilesplot_n
Plot text characters (from file or user input)plot_text
Plot n-by-n tiles.plot_tiles
Positive Psychology: AHI CESD dataposPsy_AHI_CESD
Positive Psychology: AHI CESD corrected data (in long format)posPsy_long
Positive Psychology: Participant dataposPsy_p_info
Positive Psychology: All corrected data (in wide format)posPsy_wide
Parse text (from file or user input) into string(s) of textread_ascii
Draw a sample of n random characters (from given characters)sample_char
Draw a sample of n random dates (from a given range).sample_date
Draw a sample of n random times (from a given range).sample_time
Data: t_1t_1
Data: t_2t_2
Data: t_3t_3
Data: t_4t_4
Data: t3t3
Data: t4t4
Data: table6table6
Data: table7table7
Data: table8table8
Data table9.table9
Data table tb.tb
Split string(s) of text 'x' into its charactersstr2vec text_to_chars
Split strings of text 'x' into sentencestext_to_sentences
Split string(s) of text 'x' into wordstext_to_words
A clean alternative theme for *ggplot2*theme_clean
A basic and flexible plot themetheme_ds4psy
A basic and flexible plot theme (using *ggplot2*)theme_empty
Translate text into leet slangtransl33t
Data: TrumpismsTrumpisms
Umlaut provides German Umlaut letters (as Unicode characters)Umlaut
What date is it?what_date
What month is it?what_month
What time is it?what_time
What day of the week is it?what_wday
What week is it?what_week
What year is it?what_year
Paste or collapse words 'x' into a textwords_to_text
Get the astrological sign / zodiac symbol for date(s)zodiac