### Running documentation and examples Source: https://docs.ropensci.org/charlatan/articles/contributing.html Commands to generate documentation and verify examples in the terminal. ```bash make doc ``` ```bash Rscript --no-init-file -e "library(methods); devtools::run_examples()" ``` -------------------------------- ### Run package documentation examples Source: https://docs.ropensci.org/charlatan/articles/contributing.html Execute this command in the terminal to verify that all documentation examples run without warnings or errors. ```bash Rscript --no-init-file -e "library(methods); devtools::run_examples()" ``` -------------------------------- ### Generate currency example Source: https://docs.ropensci.org/charlatan/reference/CurrencyProvider.html Example demonstrating the instantiation of the provider and generation of a currency code. ```R z <- CurrencyProvider$new() z$render() #> [1] "CZK" ``` -------------------------------- ### AddressProvider_en_NZ Examples Source: https://docs.ropensci.org/charlatan/reference/AddressProvider_en_NZ.html Demonstrates initializing the provider and generating various address fields. ```R (z <- AddressProvider_en_NZ$new()) #> < AddressProvider > #> locale: en_NZ z$postcode() #> [1] "4921" z$street_name() #> [1] "Kawanuku Road" z$address() #> [1] "PO Box 88\nNewRange Road 5750" z$city() #> [1] "UpperDrive" ``` -------------------------------- ### Example usage of CompanyProvider_fa_IR Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider_fa_IR.html Demonstrates initializing the provider and calling company-related methods. ```R x <- CompanyProvider_fa_IR$new() x$locale #> [1] "fa_IR" x$company() #> [1] "صبا فولاد خلیج فارس" x$catch_phrase() #> [1] "" x$bs() #> [1] "" ``` -------------------------------- ### CreditCardProvider usage examples Source: https://docs.ropensci.org/charlatan/reference/CreditCardProvider.html Demonstrates basic usage of the CreditCardProvider class methods. ```R z <- CreditCardProvider$new() z$credit_card_provider() #> [1] "Voyager" z$credit_card_number() #> [1] "52800008128475030" z$credit_card_security_code() #> [1] "216" z$generate_number(13) #> [1] "13991459652327" ``` -------------------------------- ### DOIProvider usage example Source: https://docs.ropensci.org/charlatan/reference/DOIProvider.html Demonstrates initializing the provider and generating a random DOI. ```R (z <- DOIProvider$new()) #> < DOIProvider > z$render() #> [1] "10.44205/kpmi.2662564" ``` -------------------------------- ### Generate a Dutch SSN example Source: https://docs.ropensci.org/charlatan/reference/SSNProvider_nl_NL.html Initializes the provider and generates a sample BSN. ```R z <- SSNProvider_nl_NL$new() z$render() #> [1] "862014566" ``` -------------------------------- ### Initialize and use AddressProvider Source: https://docs.ropensci.org/charlatan/reference/AddressProvider_en_GB.html Example of instantiating the provider and calling its methods to generate data. ```R (z <- AddressProvider_en_GB$new()) #> < AddressProvider > #> locale: en_GB z$locale #> [1] "en_GB" z$postcode() #> [1] "S4F 3GL" z$street_name() #> [1] "John course" z$address() #> [1] "64 Fiona curve Shawtown EX2A 1FJ" z$city() #> [1] "West Amandahaven" ``` -------------------------------- ### CompanyProvider_en_US Method Usage Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider_en_US.html Examples of initializing the provider and generating company-related data. ```R x <- CompanyProvider_en_US$new() x$locale #> [1] "en_US" x$company() #> [1] "Zemlak-Schamberger" x$catch_phrase() #> [1] "Seamless national data-warehouse" x$bs() #> [1] "reinvent magnetic e-commerce" ``` -------------------------------- ### Initialize and access countries Source: https://docs.ropensci.org/charlatan/reference/DateTimeProvider.html Example of initializing the provider and accessing the countries field. ```R z <- DateTimeProvider$new() z$countries ``` -------------------------------- ### Install charlatan Source: https://docs.ropensci.org/charlatan/index.html Instructions for installing the package from CRAN or the development version from GitHub. ```R install.packages("charlatan") ``` ```R remotes::install_github("ropensci/charlatan") ``` -------------------------------- ### Example of creating a localized provider Source: https://docs.ropensci.org/charlatan/reference/subclass.html Demonstrates initializing an AddressProvider, which defaults to en_US if no locale is specified. ```R x <- subclass("AddressProvider") #> Warning: No locale provided for AddressProvider defaulting to en_US #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE ``` -------------------------------- ### AddressProvider_en_US Examples Source: https://docs.ropensci.org/charlatan/reference/AddressProvider_en_US.html Demonstration of initializing the provider and calling various methods to generate address data. ```R (z <- AddressProvider_en_US$new()) #> < AddressProvider > #> locale: en_US z$locale #> [1] "en_US" z$postcode() #> [1] "28584" z$street_name() #> [1] "Vincenzo Shoal" z$address() #> [1] "8122 Kassulke Causeway Suite 643\nNorth Lolitaburgh, MI 69750-3154" z$city() #> [1] "West Zoe" z$mil_address() #> [1] "PSC 1842, Box 1493\nAPO AA 89828" z$civ_address() #> [1] "06483 Durrell Forest\nSporerton, CO 90491-8806" ``` -------------------------------- ### Generate names with PersonProvider Source: https://docs.ropensci.org/charlatan/reference/PersonProvider_ko_KR.html Example demonstrating the usage of PersonProvider methods to generate names. Note that this example uses the hr_HR locale as a reference for the API structure. ```R x <- PersonProvider_hr_HR$new() x$locale #> [1] "hr_HR" x$render() #> [1] "Zlatko Brcko" x$first_name() #> [1] "Ika" x$first_name_female() #> [1] "Robert" x$first_name_male() #> [1] "Mare" x$last_name() #> [1] "Maćešić" x$last_name_female() #> [1] "Vidaković" x$last_name_male() #> [1] "Valjetić" ``` -------------------------------- ### Usage examples for PersonProvider_ja_JP Source: https://docs.ropensci.org/charlatan/reference/PersonProvider_ja_JP.html Demonstrates initializing the provider and calling various name generation methods. ```R x <- PersonProvider_ja_JP$new() x$locale #> [1] "ja_JP" x$render() #> [1] " " x$first_name() #> [1] "Tomomi" x$first_kana_name() #> [1] "ジュン" x$first_name_female() #> [1] "Takuma" x$first_name_male() #> [1] "Ryohei" x$last_name() #> [1] "Yamamoto" x$last_name_female() #> [1] "Ogaki" x$last_name_male() #> [1] "Aota" ``` -------------------------------- ### Generate an SSN Example Source: https://docs.ropensci.org/charlatan/reference/SSNProvider_en_US.html Initializes the provider and generates a sample social security number. ```R z <- SSNProvider_en_US$new() z$render() #> [1] "840-82-4903" ``` -------------------------------- ### Run Plumber API Source: https://docs.ropensci.org/charlatan/articles/creating-realistic-data.html Command to start the Plumber API server. ```R plumber::plumb("R/plumber.R") %>% plumber::pr_run() ``` -------------------------------- ### Generate genetic sequences Source: https://docs.ropensci.org/charlatan/reference/SequenceProvider.html Examples of initializing the provider and generating sequences of varying lengths. ```R z <- SequenceProvider$new() z$render() #> [1] "TAATCCTGNCTAGAATCGNNACTNTAACCN" z$render(10) #> [1] "NGTGGCACCA" z$render(100) #> [1] "TGTAANTCTANCGTGANGGCGTTNGGNTGGCNNAGTGANATTTCTCGAATGGCGTTNGANNNGNCAGTCNNNTTGNNNNAGANTGATATTCACNTATAAC" # or even z$render(500) ``` -------------------------------- ### Usage examples for CompanyProvider_fr_FR Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider_fr_FR.html Demonstrates initializing the provider, checking the locale, and generating company data. ```R x <- CompanyProvider_fr_FR$new() x$locale #> [1] "fr_FR" x$company() #> [1] "Boucher Boucher et Fils" x$catch_phrase() #> [1] "le droit de louer plus facilement" ``` -------------------------------- ### BaseProvider Usage Examples Source: https://docs.ropensci.org/charlatan/reference/BaseProvider.html Demonstrates instantiation and the use of inherited string manipulation methods like numerify, lexify, and bothify. ```R (x <- BaseProvider$new()) #> < BaseProvider > #> locale: x$numerify("#%%asdf221?") #> [1] "775asdf221?" x$lexify("#%%asdf221?") #> [1] "#%%asdf221h" x$bothify("#%%asdf221?") #> [1] "173asdf221E" ``` -------------------------------- ### Example usage of CompanyProvider_it_IT Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider_it_IT.html Demonstrates initializing the provider and calling various methods to generate localized data. ```R x <- CompanyProvider_it_IT$new() x$locale #> [1] "it_IT" x$company() #> [1] "Villa-Benedetti s.r.l." x$catch_phrase() #> [1] "Iniziativa distribuita globale" x$bs() #> [1] "sistemi estensioni efficienti" ``` -------------------------------- ### Render Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_dk_DK.html Example of initializing a phone number provider and rendering a phone number. ```R z <- PhoneNumberProvider_en_GB$new() z$render() #> [1] "08325024138" ``` -------------------------------- ### Generate Israeli Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_he_IL.html Example of initializing the provider and rendering a phone number. ```R z <- PhoneNumberProvider_he_IL$new() z$render() #> [1] "04-1727-545" ``` -------------------------------- ### Generate a Lithuanian phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_lt_LT.html Example of initializing the provider and rendering a phone number. ```R z <- PhoneNumberProvider_lt_LT$new() z$render() #> [1] "+(370) 86013401" ``` -------------------------------- ### Generate Indian phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_hi_IN.html Example of initializing the provider and rendering a phone number. ```R z <- PhoneNumberProvider_hi_IN$new() z$render() #> [1] "08871 251378" ``` -------------------------------- ### CompanyProvider_es_MX usage examples Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider_es_MX.html Demonstrates initializing the provider and calling methods to generate company names, catch phrases, and business slogans. ```R x <- CompanyProvider_es_MX$new() x$locale #> [1] "es_MX" x$company() #> [1] "Cabrera y Asociados" x$catch_phrase() #> [1] "contingencia tiempo real multiplataforma" x$bs() #> [1] "compromete iniciativas escalables" ``` -------------------------------- ### Generate Czech company data Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider_cs_CZ.html Example showing how to initialize the provider and generate a company name. ```R x <- CompanyProvider_cs_CZ$new() x$locale #> [1] "cs_CZ" x$company() #> [1] "Dušek Doležal a.s." ``` -------------------------------- ### Examples of ch_currency Source: https://docs.ropensci.org/charlatan/reference/ch_currency.html Demonstrates generating a single currency code and a vector of multiple currency codes. ```R ch_currency() #> [1] "GHS" ch_currency(10) #> [1] "DZD" "MZN" "MVR" "PGK" "CZK" "SOS" "TJS" "LYD" "ALL" "TJS" # or even ch_currency(500) ``` -------------------------------- ### AddressProvider_nl_NL Usage Example Source: https://docs.ropensci.org/charlatan/reference/AddressProvider_nl_NL.html Demonstrates initializing the provider and calling various methods to generate Dutch address data. ```R (z <- AddressProvider_nl_NL$new()) #> < AddressProvider > #> locale: nl_NL z$locale #> [1] "nl_NL" z$postcode() #> [1] "3088 JQ" z$street_name() #> [1] "Kayleestraat" z$address() #> [1] "Arienshof 199\n2077 DV Sepptrecht" z$city() #> [1] "Masonmeren" z$province() #> [1] "Zuid-Holland" ``` -------------------------------- ### CoordinateProvider usage examples Source: https://docs.ropensci.org/charlatan/reference/CoordinateProvider.html Demonstrates basic usage of the CoordinateProvider class methods including coordinate generation and bounding box constraints. ```R z <- CoordinateProvider$new() z$lon() #> [1] 93.87401 z$lat() #> [1] -88.04296 z$position() #> [1] -157.27056 -42.50848 z$position(bbox = c(-120, 30, -110, 60)) #> [1] -114.0616 38.9268 ``` -------------------------------- ### Generate Bulgarian company data Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider_bg_BG.html Example of initializing the provider and generating a company name. ```R x <- CompanyProvider_bg_BG$new() x$locale #> [1] "bg_BG" x$company() #> [1] "Татьозов Скринска EOOD" ``` -------------------------------- ### Render Peruvian Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_es_PE.html Example of initializing the provider and rendering a phone number. ```R z <- PhoneNumberProvider_es_PE$new() z$render() #> [1] "01-105-2686" ``` -------------------------------- ### Generate a Korean phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_ko_KR.html Example of initializing the provider and rendering a random phone number. ```R z <- PhoneNumberProvider_ko_KR$new() z$render() #> [1] "053-520-2671" ``` -------------------------------- ### Generate Portuguese Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_pt_PT.html Example of initializing the provider and rendering a random Portuguese phone number. ```R z <- PhoneNumberProvider_pt_PT$new() z$render() #> [1] "(351) 201 294 086" ``` -------------------------------- ### Generate a Taiwan phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_zh_TW.html Example of initializing the provider and rendering a random phone number. ```R z <- PhoneNumberProvider_zh_TW$new() z$render() #> [1] "02-20862858" ``` -------------------------------- ### Examples of charlatan settings usage Source: https://docs.ropensci.org/charlatan/reference/charlatan_settings.html Demonstrates how to check and modify the global messy setting and its effect on PersonProvider instances. ```R charlatan_settings() #> $global_messy #> NULL #> charlatan_settings(messy = TRUE) #> $global_messy #> [1] TRUE #> charlatan_settings(messy = FALSE) #> $global_messy #> [1] FALSE #> # with PersonProvider - overrides local messy param in all cases x <- PersonProvider_en_US$new() x$messy #> [1] FALSE charlatan_settings(messy = TRUE) #> $global_messy #> [1] TRUE #> x <- PersonProvider_en_US$new() #> Warning: Global setting for messy is TRUE x$messy #> [1] TRUE ``` -------------------------------- ### Initialize transactional data generation Source: https://docs.ropensci.org/charlatan/articles/creating-realistic-data.html Placeholder block for starting the transactional data generation workflow. ```R ``` ``` -------------------------------- ### Render Indonesian Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_id_ID.html Example of initializing the provider and rendering a random Indonesian phone number. ```R z <- PhoneNumberProvider_id_ID$new() z$render() #> [1] "+62 (0317) 369 0591" ``` -------------------------------- ### Render Swiss-French Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_fr_CH.html Example of initializing the provider and rendering a random phone number. ```R z <- PhoneNumberProvider_fr_CH$new() z$render() #> [1] "0906 370 475" ``` -------------------------------- ### Generate Italian Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_it_IT.html Example of initializing the provider and rendering a random Italian phone number. ```R z <- PhoneNumberProvider_it_IT$new() z$render() #> [1] "+39 100 42863022" ``` -------------------------------- ### Generate Slovakian Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_sk_SK.html Example of initializing the provider and rendering a random phone number. ```R z <- PhoneNumberProvider_sk_SK$new() z$render() #> [1] "+421 900 497 099" ``` -------------------------------- ### Generate a Finnish phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_fi_FI.html Example of initializing the provider and rendering a random Finnish phone number. ```R z <- PhoneNumberProvider_fi_FI$new() z$render() #> [1] "(+358) 612672649" ``` -------------------------------- ### Examples of generating taxonomic names Source: https://docs.ropensci.org/charlatan/reference/taxonomy.html Demonstrates generating single or multiple taxonomic genera, epithets, and species names. ```R ch_taxonomic_genus() #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> [1] "Rafflesia" ch_taxonomic_genus(10) #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> [1] "Rafflesia" "Brachystelma" "Chrysochlamys" "Psephellus" #> [5] "Dryopolystichum" "Antiphytum" "Plagiobryum" "Acrostichum" #> [9] "Prinos" "Raphanus" # or even ch_taxonomic_genus(500) ch_taxonomic_epithet() #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> [1] "deltoidea" ch_taxonomic_epithet(10) #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> [1] "blumeana" "rubropilosa" "decorticans" "bracteosum" #> [5] "aurosicus" "neapolitana" "rhaphidostegum" "bracteosum" #> [9] "nothofagicola" "aridus" # or even ch_taxonomic_epithet(500) ch_taxonomic_species() #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> [1] "Normanbya pilmaiquen" ch_taxonomic_species(10) #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> Warning: Global setting for messy is TRUE #> [1] "Stylochiton daniel-jimenezii" "Sisyrinchium brevicaudata" #> [3] "Modecca styriacum" "Crocus neapolitana" #> [5] "Soleirolia incanus" "Synnema leratii" #> [7] "Eucharis cacharensis" "Eugenia hockii" #> [9] "Peltoboykinia anamensis" "Microcos saksenanus" # or even ch_taxonomic_species(500) ``` -------------------------------- ### Generate Czech Names with PersonProvider_cs_CZ Source: https://docs.ropensci.org/charlatan/reference/PersonProvider_cs_CZ.html Examples of initializing the provider and generating various types of Czech names. ```R x <- PersonProvider_cs_CZ$new() x$locale #> [1] "cs_CZ" x$render() #> [1] "JUDr. Miloslava Šimková" x$first_name() #> [1] "Marek" x$first_name_female() #> [1] "Daniela" x$first_name_male() #> [1] "Robin" x$last_name() #> [1] "Benešová" x$last_name_female() #> [1] "Horáková" x$last_name_male() #> [1] "Soukup" ``` -------------------------------- ### Generate a Greek phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_el_GR.html Example of initializing the provider and rendering a random Greek phone number. ```R z <- PhoneNumberProvider_el_GR$new() z$render() #> [1] "(+30) 6937 853275" ``` -------------------------------- ### Render German Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_de_DE.html Example of initializing the provider and generating a random German phone number. ```R z <- PhoneNumberProvider_de_DE$new() z$render() #> [1] "05509 21645" ``` -------------------------------- ### Generate a Norwegian phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_nn_NO.html Example of initializing the provider and rendering a random phone number. ```R z <- PhoneNumberProvider_nn_NO$new() z$render() #> [1] "92693689" ``` -------------------------------- ### Generate Turkish Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_tr_TR.html Example of initializing the provider and rendering a random Turkish phone number. ```R z <- PhoneNumberProvider_tr_TR$new() z$render() #> [1] "+90(039)7342987" ``` -------------------------------- ### Generate Iranian Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_fa_IR.html Example of initializing the provider and rendering a random Iranian phone number. ```R z <- PhoneNumberProvider_fa_IR$new() z$render() #> [1] "+98 23 6606 3813" ``` -------------------------------- ### Generate Hungarian Phone Number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_hu_HU.html Example of initializing the provider and rendering a random Hungarian phone number. ```R z <- PhoneNumberProvider_hu_HU$new() z$render() #> [1] "(06)13/845-9883" ``` -------------------------------- ### Get a random locale Source: https://docs.ropensci.org/charlatan/reference/MiscProvider.html Returns a random locale string. ```R MiscProvider$locale() ``` -------------------------------- ### NumericsProvider Method Usage Source: https://docs.ropensci.org/charlatan/reference/NumericsProvider.html Usage examples for the various numeric generation methods available in the NumericsProvider class. ```R NumericsProvider$double(n = 1, mean = 0, sd = 1) ``` ```R NumericsProvider$integer(n = 1, min = 1, max = 1000) ``` ```R NumericsProvider$unif(n = 1, min = 0, max = 9999) ``` ```R NumericsProvider$norm(n = 1, mean = 0, sd = 1) ``` ```R NumericsProvider$lnorm(n = 1, mean = 0, sd = 1) ``` ```R NumericsProvider$beta(n = 1, shape1, shape2, ncp = 0) ``` ```R NumericsProvider$clone(deep = FALSE) ``` ```R z <- NumericsProvider$new() z$double() #> [1] 0.6274909 z$double(10) #> [1] 0.82250394 -0.02234212 1.72386032 -0.29242599 -0.33458009 -0.01715730 #> [7] -2.04457881 -1.29253095 -1.29238974 -0.55272404 z$double(10, mean = 100) #> [1] 100.20243 99.61637 99.05393 98.76779 100.29301 100.11733 100.70762 #> [8] 101.96876 100.87035 99.08668 z$double(10, mean = 100, sd = 17) #> [1] 103.78318 77.55447 122.33381 87.59693 84.16423 108.78935 104.79715 #> [8] 82.02750 90.21246 74.43614 z$integer() #> [1] 2 z$integer(10) #> [1] 924 842 259 574 688 997 779 585 934 604 z$integer(10, 1, 20) #> [1] 7 14 17 12 2 17 10 3 13 19 z$integer(10, 1, 10000000L) #> [1] 6328585 7688163 511873 2943010 9077977 8966956 1584793 9592701 9116674 #> [10] 1725078 z$unif() #> [1] 8273.355 z$norm() #> [1] 0.8385327 z$lnorm(10) #> [1] 2.88931184 1.99709958 1.95929785 0.94663397 0.38663518 0.05385108 #> [7] 3.74354215 1.54297478 0.29396991 1.67507462 z$beta(10, 1, 1) #> [1] 0.81059553 0.05705297 0.09481279 0.95385979 0.57083511 0.33032058 #> [7] 0.41852217 0.33992936 0.23875820 0.09864429 ``` -------------------------------- ### Generate Lorem Ipsum text Source: https://docs.ropensci.org/charlatan/reference/LoremProvider_en_US.html Examples of generating various types of placeholder text using the LoremProvider_en_US provider. ```R x <- LoremProvider_en_US$new() x$word() #> [1] "military" x$words(3) #> [1] "together" "enter" "place" x$words(6) #> [1] "or" "try" "student" "guess" "however" "whether" x$sentence() #> [1] "Common difference job." x$paragraph() #> [1] "Hot body market religious." x$paragraphs(3) #> [1] "Hospital on letter decision base. Team green production down of." #> [2] "System my site blood. Oil wait task free six dog hair." #> [3] "Gas right bit car movie much. Main president approach give." cat(x$paragraphs(6), sep = "\n") #> Baby weight together lot great sing improve. Vote me inside let by part. #> Sister deal world set wrong. Our nation fund cover. #> Expect policy first board tough one between. Professor either class identify get particular. Technology thought not let green exactly wide ten. #> Article stay time though interview join fly. Recently yard keep deal. Show seem use value. #> View scientist move property feeling later poor. Tend week either never north. #> Memory participant analysis positive cut garden lead. Black face local finish teach industry discover. x$text(19) #> [1] "Approach candidate." x <- LoremProvider_en_US$new(word_connector = " --- ") x$paragraph(4) #> [1] "Become --- family --- long. --- Street --- friend --- meet --- big --- attention --- write --- left. --- Can --- my --- southern --- beautiful --- reduce --- begin. --- Tax --- last --- off --- opportunity --- Mr --- hear --- these." ``` -------------------------------- ### Generate a Norwegian phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_no_NO.html Example of initializing the provider and rendering a random Norwegian phone number. ```R z <- PhoneNumberProvider_no_NO$new() z$render() #> [1] "70729693" ``` -------------------------------- ### Generate Swedish phone number Source: https://docs.ropensci.org/charlatan/reference/PhoneNumberProvider_sv_SE.html Example of initializing the provider and rendering a random Swedish phone number. ```R z <- PhoneNumberProvider_sv_SE$new() z$render() #> [1] "044-46 39 76" ``` -------------------------------- ### Retrieve chemical element data Source: https://docs.ropensci.org/charlatan/reference/ElementProvider_nl_NL.html Examples of using the provider to fetch a chemical symbol and element name. ```R z <- ElementProvider_nl_NL$new() z$symbol() #> [1] "Cd" z$element() #> [1] "Thulium" ``` -------------------------------- ### Generate internet data with InternetProvider_fa_IR Source: https://docs.ropensci.org/charlatan/reference/InternetProvider_fa_IR.html Examples of generating various internet-related data points such as emails and MAC addresses using the provider. ```R x <- InternetProvider_fa_IR$new() #> Warning: LoremProvider does not have locale fa_IR, defaulting to en_US locale. x$email() #> [1] "امیرمحمد36@ساخت.org" x$free_email() #> [1] "سماوات.یوسف@gmail.com" x$mac_address() #> [1] "ea:d5:14:54:a5:24:7a" x$company_email() #> [1] "جهانی.كیان@گلاب.net" ``` -------------------------------- ### Initialize InternetProvider Source: https://docs.ropensci.org/charlatan/reference/InternetProvider.html Create a new instance of the InternetProvider class. ```R InternetProvider$new() ``` -------------------------------- ### Generate fake colors in R Source: https://docs.ropensci.org/charlatan/reference/ch_color.html Examples of generating color names, hex codes, RGB values, and CSS strings, including locale-specific output. ```R ch_color_name() #> [1] "Orchid" ch_color_name(10) #> [1] "Moccasin" "DarkViolet" "Turquoise" "DeepSkyBlue" #> [5] "DarkSlateBlue" "Snow" "DarkBlue" "WhiteSmoke" #> [9] "DeepPink" "MediumBlue" # or even ch_color_name(500) ch_safe_color_name() #> [1] "navy" ch_safe_color_name(10) #> [1] "maroon" "green" "black" "maroon" "navy" "yellow" "yellow" #> [8] "aqua" "maroon" "fuchsia" ch_hex_color() #> [1] "#10BD77" ch_hex_color(10) #> [1] "#50C64C" "#A602E9" "#F40AC7" "#3FC13D" "#06A7D5" "#8EDFFC" "#4FCD9D" #> [8] "#2CC973" "#39C3C0" "#CC14A6" # or even ch_hex_color(1000) ch_safe_hex_color() #> [1] "#ff6699" ch_safe_hex_color(10) #> [1] "#9933ff" "#33ff33" "#cc99ff" "#cc0033" "#990099" "#66cc00" "#990099" #> [8] "#6699cc" "#ccffff" "#ff99cc" ch_rgb_color() #> [[1]] #> [1] 149 168 201 #> ch_rgb_color(10) #> [[1]] #> [1] 91 104 225 #> #> [[2]] #> [1] 99 143 169 #> #> [[3]] #> [1] 184 182 202 #> #> [[4]] #> [1] 91 34 98 #> #> [[5]] #> [1] 197 17 215 #> #> [[6]] #> [1] 197 158 197 #> #> [[7]] #> [1] 189 153 212 #> #> [[8]] #> [1] 224 1 37 #> #> [[9]] #> [1] 3 214 120 #> #> [[10]] #> [1] 206 35 145 #> ch_rgb_css_color() #> [1] "rgb(69, 245, 167)" ch_rgb_css_color(10) #> [1] "rgb(250, 178, 189)" "rgb(86, 39, 78)" "rgb(67, 201, 119)" #> [4] "rgb(208, 226, 214)" "rgb(154, 236, 142)" "rgb(101, 215, 0)" #> [7] "rgb(37, 90, 98)" "rgb(98, 156, 183)" "rgb(122, 127, 226)" #> [10] "rgb(152, 119, 177)" ch_color_name(locale = "uk_UA") #> [1] "Джинсовий" ch_color_name(n = 10, locale = "uk_UA") #> [1] "Синя пил" "Жовтий" #> [3] "Колір жовтого шкільного автобуса" "Гумігут" #> [5] "Шафрановий" "Темно-бірюзовий" #> [7] "Персиковий" "Фіолетово-баклажановий" #> [9] "Помаранчевий" "Сапфіровий" ch_safe_color_name(locale = "uk_UA") #> [1] "Чорний" ch_safe_color_name(n = 10, locale = "uk_UA") #> [1] "Жовтий" "Ціан (колір)" "Жовтий" #> [4] "Срібний" "Ціан (колір)" "Жовтий" #> [7] "Ціан (колір)" "Колір морської хвилі" "Чорний" #> [10] "Колір морської хвилі" ``` -------------------------------- ### Generate fake company names Source: https://docs.ropensci.org/charlatan/reference/ch_company.html Examples of generating company names with default settings, specific counts, and various international locales. ```R ch_company() #> [1] "Krajcik Inc" ch_company(10) #> [1] "Connelly, Gaylord and Thiel" "Predovic, Gleason and Kreiger" #> [3] "Hilll, Pagac and Torphy" "Schimmel Ltd" #> [5] "Kuhic-Schmeler" "Will Ltd" #> [7] "Kuhlman, Haag and Okuneva" "Lemke PLC" #> [9] "Koch Inc" "Lubowitz Ltd" # or even ch_company(500) ch_company(locale = "fr_FR", n = 10) #> [1] "Boucher" "Jacques" "Gosselin" #> [4] "Riou et Fils" "Pages SARL" "Voisin Voisin SA" #> [7] "Pires et Fils" "Rey Rey S.A.R.L." "Mendes" #> [10] "Labbe Labbe S.A.R.L." ch_company(locale = "cs_CZ", n = 10) #> [1] "Procházka Urbanová a.s." "Kadlec" #> [3] "Holubová" "Novotná" #> [5] "Procházková Holub a.s." "Kříž a.s." #> [7] "Polák" "Bláhová Čermák o.s." #> [9] "Růžičková" "Pospíšil a.s." ch_company(locale = "es_MX", n = 10) #> [1] "Proyectos Guevara, Urbina y Pantoja" "Despacho Girón y Rocha" #> [3] "Pizarro-Venegas" "Santana-Jaimes S.A." #> [5] "Navarrete-Rodrígez S.C." "Arevalo, Luevano y Valdivia" #> [7] "Loya, Salcedo y Lebrón" "Posada, Chavarría y Villa" #> [9] "Gallardo-Linares e Hijos" "Iglesias-Sauceda" ch_company(locale = "hr_HR", n = 10) #> [1] "Marušić" "Skupnjak" "Malnar Načinović d.d." #> [4] "Majdenić" "Žerjav" "Trutanić d.d." #> [7] "Jakuš" "Mamula Klasić j.d.o.o." "Klanac" #> [10] "Lojen j.d.o.o." ``` -------------------------------- ### Generate Japanese Lorem Ipsum text Source: https://docs.ropensci.org/charlatan/reference/LoremProvider_ja_JP.html Examples of generating various Japanese placeholder text formats using the LoremProvider_ja_JP provider. ```R x <- LoremProvider_ja_JP$new() x$word() #> [1] "残る" x$words(3) #> [1] "催眠術" "カラム" "ボトル" x$words(6) #> [1] "販売" "数字" "ホイール" "ヒール" "ジャム" "ボトル" x$sentence() #> [1] "サワー 明らかにする メニュー ベルベット." x$paragraph() #> [1] "柔らかい 尊敬する 式 ストレージ. リフト 助けて トス 部隊 必要." x$paragraphs(3) #> [1] "ブレーキ 知覚 高い 細かい バケツ コンペ カラム. 保証金 〜 は 教会 シェービング フェミニスト 主人. タワー 〜 コーラス 尿 偏差 は パン." #> [2] "立派な 運 反射 ホイール 副 知覚. 憲法 探査 バナー 発生する 憲法 ホイール あなた自身." #> [3] "評議会 再現する 憲法 雪 主人 屋根裏 部隊 不自然な. 文言 見落とす 指名." cat(x$paragraphs(6), sep = "\n") #> ノート クロス 暖かい リフト バナー. リハビリ 柔らかい 意図 不自然な. 明らかにする リハビリ ハンマー リハビリ 教授 キャビネット 月. #> 狐 クルー バスケット コミュニティ 障害. #> 隠す インチ パーセント あなた自身 偏差 日曜日 バナー 追放する. #> 主婦 持っていました 持つ 彼. 倫理 指名 コンペ 柔らかい ストレージ 教授 陶器. #> 差別する 創傷 クロス. キャビネット 探査 バケツ 文言 画面 敵対的な. 血まみれの クロス 省略 障害 デッド 目的 サラダ. #> 普通の 風景 錯覚 月. ジャーナル 装置 トーン 立派な 尊敬する 証言する. ヒール 運 暖かい. x$text(19) #> [1] "数字 ピック アクセルペダル." x <- LoremProvider_ja_JP$new(word_connector = " --- ") x$paragraph(4) #> [1] "持つ --- 持ってる --- シェービング --- 立派な --- 戦略的 --- 追放する --- 持つ --- トーン. --- 電池 --- 販売 --- フェミニスト. --- ホイール --- 探査 --- ニュース --- 索引 --- 数字." ``` -------------------------------- ### Initialize FileProvider Source: https://docs.ropensci.org/charlatan/reference/FileProvider.html Create a new instance of the FileProvider class. ```R FileProvider$new() ``` -------------------------------- ### Get a random language code Source: https://docs.ropensci.org/charlatan/reference/MiscProvider.html Returns a random language code string. ```R MiscProvider$language_code() ``` -------------------------------- ### Get a random symbol Source: https://docs.ropensci.org/charlatan/reference/ElementProvider.html Returns a single chemical symbol chosen at random. ```R ElementProvider$symbol() ``` -------------------------------- ### Get credit card provider Source: https://docs.ropensci.org/charlatan/reference/CreditCardProvider.html Returns the name of a credit card provider. ```R CreditCardProvider$credit_card_provider(card_type = NULL) ``` -------------------------------- ### CreditCardProvider$generate_number() Source: https://docs.ropensci.org/charlatan/reference/CreditCardProvider.html Generates a credit card number with specific starting numbers. ```APIDOC ## Method: generate_number() ### Description Make a credit card number with specific starting numbers. ### Usage `CreditCardProvider$generate_number(prefix, length = 13)` ### Arguments - **prefix** (string) - Required - The start of the CC number as a string, any number of digits. - **length** (numeric) - Optional - The length of the CC number to generate. Typically 13 or 16. ``` -------------------------------- ### Initialize CompanyProvider Source: https://docs.ropensci.org/charlatan/reference/CompanyProvider.html Create a new instance of the CompanyProvider class. ```R CompanyProvider$new() ``` -------------------------------- ### Generate internet data with InternetProvider_bg_BG Source: https://docs.ropensci.org/charlatan/reference/InternetProvider_bg_BG.html Examples of generating various internet-related strings such as emails and MAC addresses using the Bulgarian provider. ```R x <- InternetProvider_bg_BG$new() #> Warning: LoremProvider does not have locale bg_BG, defaulting to en_US locale. x$email() #> [1] ".@NA.edu" x$free_email() #> [1] ".@abv.bg" x$mac_address() #> [1] "e4:35:74:9d:7f:b6:36" x$company_email() #> [1] "@кда.edu" ``` -------------------------------- ### Initialize TaxonomyProvider Source: https://docs.ropensci.org/charlatan/reference/TaxonomyProvider.html Creates a new instance of the TaxonomyProvider class. ```R TaxonomyProvider$new() ``` -------------------------------- ### Initialize AddressProvider Source: https://docs.ropensci.org/charlatan/reference/AddressProvider.html Create a new instance of the AddressProvider class. ```R AddressProvider$new() ```