Skip to content

Instantly share code, notes, and snippets.

https://posit.cloud/spaces/679632/join?access_code=2zOCkqY-ZUkzMD-vHeAvoa2BzkPe7GkG8o-jl7wn
@ijlyttle
ijlyttle / README.md
Last active September 21, 2025 21:06
How to get the posit cloud space up-and-runnng for "From R User to R Programmer"

The invitation is sent to [email protected], and the I sign in using my ijlyttle account, which uses [email protected].

The invitation is to a space, ours is called "From R User to R Programmer". Within that space, we can create a project; we will create "r-programming-exercises". We will create a code project.

It looks like I will:

Using deno, git, virtualenv plugins

lyttle.zsh-theme:

PROMPT='%{$fg_bold[cyan]%}$(virtualenv_prompt_info)%}$(git_prompt_info) %c %{$fg_bold[white]%}%% %{$reset_color%}'

ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
ZSH_THEME_GIT_PROMPT_DIRTY=""
@ijlyttle
ijlyttle / deno.md
Created December 10, 2022 21:29
Deno configuration

This is macOS-centric.

Installation

brew install deno

Configuration

@ijlyttle
ijlyttle / app.R
Last active October 5, 2022 23:12
# Example of vegawidget with dynamic data and signal
#
# To use shiny_get_signal along with dynamic data (on R side), you have to use
# shiny_set_data as well. This is because the binding of shiny_get_signal breaks
# if you use normal reactive data (see other file in this folder).
#
# shiny_set_data work saround that problem and uses an elegant reactive solution
#
# based on: https://github.com/rhenkin/rsnippets/blob/main/vegawidget_shinygetsignal/app_working.R
#
@ijlyttle
ijlyttle / LICENSE.md
Last active February 5, 2022 18:51
Generating JSON for CVD matrices

MIT License

Copyright (c) 2022 Ian Lyttle

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@ijlyttle
ijlyttle / manifesto.md
Last active September 28, 2020 13:31
github flow manifesto

These ideas based on GitHub Flow and are heavily influenced by Jenny Bryan and Hadley Wickham, through their R package {usethis}.

Remotes

The term upstream refers to a remote that is the "canonical" repository for a project.

The term origin refers to a remote that is a fork of an upstream remote.

If you are one of the maintainers for a repository, you can push to the upstream remote.

@ijlyttle
ijlyttle / altair.Rmd
Created January 23, 2020 17:15
Altair + reticulate + vegawidget
---
title: "Altair-reticulate"
output: html_document
---
```{r load_packages}
library(vegawidget)
library(reticulate)
```
@ijlyttle
ijlyttle / woodiac.R
Last active December 21, 2019 02:17
An alternative calendar
# imports lubridate, emo, glue, purrr
as_woodiac <- function(x) {
is_dst <- lubridate::dst(as.POSIXct(x)) # pick up OS timzone
x <- lubridate::as_date(x)
date_2000 <- x
lubridate::year(date_2000) <- 2000
@ijlyttle
ijlyttle / ssh-travis-pkgdown.md
Last active November 2, 2019 23:19
Manual deployment for travis & pkgdown

SSH for travis-pkgdown

In the .ssh directory, we should have:

id_rsa & id_rsa.pub - the default keys for this computer

In addition, you need a distinct set of keys for each repository. Accordingly, each of these would be a directory within .ssh:

  • gh-deploy-vegawidget
  • gh-deploy-altair