## First read example smet file provided in package
(Wx = readSmet(system.file('extdata', 'example.smet', package = 'sarp.snowprofile')))
## Then write Wx to a new temp file and show the file
writeSmet(Wx, filename = file.path(tempdir(), 'file.smet'))
file.show(file.path(tempdir(), 'file.smet'))
## Check whether it can be read back in
(WxNew <- readSmet(file.path(tempdir(), 'file.smet')))
Run the code above in your browser using DataLab