R/hash.R

`hash` <-
function(x,char='#'){
	con <- file()
	sink(con)
	result <- try(x)
	if(!inherits(result,"try-error"))print(result)
	comments <- paste(char,readLines(con))
	sink(NULL)
	close(con)
	writeLines(comments)	
}
naInContext <- function(x,context,search){
	guilty <- !complete.cases(x[,search])
	keys <- interaction(x[,context])
	x[keys %in% keys[guilty],]
}

Try the metrumrg package in your browser

Any scripts or data that you put into this service are public.

metrumrg documentation built on May 2, 2019, 5:55 p.m.