This file contains hidden or 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
## Define function that will convert temperatures to Celcius and divide by 8 [same as * 1/8] (as each measurement represents 1/8 of a day) | |
#Note: need to add a part here where any value <0 = 0 and not a negative, as heating DD's are calculated only using the 'above the threshold' | |
extractDD=function(path) { | |
# extract values and convert to kelvin | |
vals=(values(raster(path,varname="TMP"))-273.15)/8 | |
# set any numbers < 0 to zero | |
if (sum(vals<0)>0) { | |
vals[which(vals<0)]=0 | |
} | |
# return error if any NAs |
This file contains hidden or 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(shiny) | |
shinyServer(function(input, output, session) { | |
# Partial example | |
output$meh <- renderPrint({ | |
print("Press enter or focusout to update --- ") | |
print(input$myTextInput ) |