Journey Through `tyecon`: Predictions on Recipe Nutritions

Introduction In this second part of the “journey through tyecon” series, I want to showcase the package’s facilities in simplifying tasks common to the predictive modelling part of data analysis. I will be using the Food.com dataset as before. Setup and Data Import library(tidyverse) library(tidyselect) library(magrittr) library(vroom) library(tyecon) library(rsample) library(yardstick) library(glmnet) library(earth) library(pls) knitr::opts_chunk$set(fig.path = "") knitr::opts_chunk$set(dev = 'svg') theme_set(theme_light()) set.seed(123) recipes <- vroom("~/Workspace/foodrecipes/RAW_recipes.csv") interacts <- vroom("~/Workspace/foodrecipes/RAW_interactions.csv") Nutrition values, except for calories, are all percent of daily value, a daily quota filled by the amount of the percentage by the consumption of the specific food....

02.07.2022

Journey Through `tyecon`: Exploring Food.com Tags

Introduction I’ve been working on my R package, tyecon for some time now. I think it can be a useful tool in performing day to day data analysis tasks. The idea is very simple: More higher order macros. There’s no reason to focus on the handful of existing ones, like the magrittr pipes or the dplyr syntax. We have a language here that supports lazy evaluation and first class functions. This is all we need to make programming life easier....

01.06.2022

dplyr Cheatsheet to DataFrames.jl Page 2

Continuing Where We Left This post shows how to translate the second page of the dplyr cheatsheet to DataFrames.jl and Julia commnads. using RDatasets, RCall, DataFrames, StatsBase, Statistics R"library(tidyverse)"; Setting up the data using RCall mpg = dataset("ggplot2", "mpg"); Vectorized Functions lag, lead julia> R""" mutate(mpg, leadyear = lead(year)) %>% select(year, leadyear) %>% tail """ RObject{VecSxp} # A tibble: 6 x 2 year leadyear <int> <int> 1 1999 2008 2 2008 2008 3 2008 1999 4 1999 1999 5 1999 2008 6 2008 NA In Julia:...

13.11.2021

dplyr Cheatsheet to DataFrames.jl Page 1

Introduction With the release of v1.0 of the DataFrames.jl package, it would seem appropriate to introduce a rather comprehensive cheatsheet of it. One that is of special use to people who come from tidyverse (arguably, the best data transformation syntax there is for combined expressiveness and brevity). The order of topics is the same as dplyr cheatsheet. using RDatasets, RCall, DataFrames, StatsBase, InteractiveErrors R"library(dplyr)"; Setting up the data using RCall data = dataset("datasets", "iris") @rput data; Summarize Cases summarize julia> R"summarize(data, avSL = mean(SepalLength), avSW = mean(SepalWidth))" RObject{VecSxp} avSL avSW 1 5....

02.11.2021