R/viewer_save_image.R

Defines functions viewer_save_image

Documented in viewer_save_image

viewer_save_image <- function(from, to){

	# Decode 'to'
	to_decode <- URLdecode(to)
	to_decode <- gsub('[+]', ' ', to_decode)

	# Copy image file from temp folder
	file.copy(from=from, to=to_decode, overwrite=TRUE)

	#cat('from: ', from, '\n')
	#cat('to: ', to_decode, '\n')
	
	# Remove version in temp
	if(file.exists(from)) file.remove(from)
}

Try the svgViewR package in your browser

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

svgViewR documentation built on Aug. 29, 2023, 1:06 a.m.