inst/script/make-stars.R

# import stars data for HR diagram 
library(tidyverse)
stars <- read.table("inst/extdata/HRlist2.txt")
names(stars) <- c("star", "magnitude", "temp", "type")
stars$type <- str_remove(stars$type, "[^A-Z]+")
save(stars, file = "data/stars.rda", compress = "xz")
rafalab/dslabs documentation built on Nov. 29, 2023, 9:53 p.m.