This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot2) | |
covid <- readr::read_csv("data/covid.csv") | |
# One solution (the one that everyone does) | |
covid_ny <- covid |> | |
filter(state=="NY") | |
ggplot(covid_ny, aes(x=date, y=cases)) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "SummaryTable" | |
format: html | |
--- | |
```{r} | |
library(palmerpenguins) | |
data(penguins) | |
ojs_define(penguins) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 20 columns, instead of 16. in line 9.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"","name","manufacturer","type","calories","protein","fat","sodium_mg","fiber_content_g","carbo_g","sugars_g","potass","vitamins","shelf","weight","cups","rating","X","mascot","has_mascot" | |
"1","100% Bran","Nabisco","C",70,4,1,130,10,5,6,280,25,"3",1,0.33,68.402973,NA,NA,"No" | |
"2","100% Natural Bran","Quaker Oats","C",120,3,5,15,2,8,8,135,0,"3",1,1,33.983679,NA,NA,"No" | |
"3","All-Bran","Kelloggs","C",70,4,1,260,9,7,5,320,25,"3",1,0.33,59.425505,NA,NA,"No" | |
"4","All-Bran with Extra Fiber","Kelloggs","C",50,4,0,140,14,8,0,330,25,"3",1,0.5,93.704912,NA,NA,"No" | |
"5","Almond Delight","Ralston Purina","C",110,2,2,200,1,14,8,-1,25,"3",1,0.75,34.384843,NA,NA,"No" | |
"6","Apple Cinnamon Cheerios","General Mills","C",110,2,2,180,1.5,10.5,10,70,25,"1",1,0.75,29.509541,NA,NA,"No" | |
"7","Apple Jacks","Kelloggs","C",110,2,0,125,1,11,14,30,25,"2",1,1,33.174094,NA,NA,"No" | |
"8","Basic 4","General Mills","C",130,3,2,210,2,18,8,100,25,"3",1.33,0.75,37.038562,NA,NA,"No" | |
"9","Bran Chex","Ralston Purina","C",90,2,1,200,4,15,6,125,25,"1",1,0.6 |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"","title","site","country","year_release","box_office","director","number_of_subjects","subject","type_of_subject","race_known","subject_race","person_of_color","subject_sex","lead_actor_actress" | |
"1","10 Rillington Place","tt0066730","UK",1971,NA,"Richard Fleischer",1,"John Christie","Criminal","Unknown",NA,FALSE,"Male","Richard Attenborough" | |
"2","12 Years a Slave","tt2024544","US/UK",2013,56700000,"Steve McQueen",1,"Solomon Northup","Other","Known","African American",TRUE,"Male","Chiwetel Ejiofor" | |
"3","127 Hours","tt1542344","US/UK",2010,18300000,"Danny Boyle",1,"Aron Ralston","Athlete","Unknown",NA,FALSE,"Male","James Franco" | |
"4","1987","tt2833074","Canada",2014,NA,"Ricardo Trogi",1,"Ricardo Trogi","Other","Known","White",FALSE,"Male","Jean-Carl Boucher" | |
"5","20 Dates","tt0138987","US",1998,537000,"Myles Berkowitz",1,"Myles Berkowitz","Other","Unknown",NA,FALSE,"Male","Myles Berkowitz" | |
"6","21","tt0478087","US",2008,81200000,"Robert Luketic",1,"Jeff Ma","Other","Known","Asian American",TRUE,"Male","Jim Stu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "testing" | |
format: html | |
editor: visual | |
--- | |
## Quarto | |
This is a test of interacting with a reactable with selectable rows. We use the `{reactable}` htmlwidget and add an extra JavaScript Button to copy the selected field titles to the clipboard as an R-formatted vector. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "pmap" | |
author: "Ted Laderas" | |
date: "February 28, 2019" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shiny App showing tidyeval with multiple variables | |
library(shiny) | |
data(iris) | |
library(dplyr) | |
numericVariables <- c("Sepal.Length", "Sepal.Width","Petal.Length", "Petal.Width") | |
# Define UI for application that draws a histogram | |
ui <- fluidPage( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code example to show how to use tidyeval within Shiny | |
library(shiny) | |
data(iris) | |
library(dplyr) | |
numericVariables <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") | |
ui <- fluidPage( | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is a Shiny web application. You can run the application by clicking | |
# the 'Run App' button above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
library(shiny) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some useful ways to manipulate expressionSets | |
# Please cite me if you use this code | |
library(Hiiragi2013) | |
# load data | |
data(x) | |
# Show sample Information | |
pData(phenoData(x)) |
NewerOlder