You're likely trying to take the log of zero.
This file contains 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
git branch -d branch-to-delete | |
git fetch -p |
This file contains 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
# Create track | |
set.seed(8675309) | |
turning_angles <- runif(100, 0, 2*pi) | |
runs <- runif(100, 0, 50) | |
fake_track <- data.frame(x = 0, | |
y = 0, | |
t = 1) |
The following was adapted from the blog post here.
The key is to use results = "asis"
. More information can be found here. Basically:
- anything output with
cat()
will be evaluated as RMarkdown. - anything output with
print()
will be evaluated with R.
for(i in seq(min(station_key$year), max(station_key$year), 1)){
This file contains 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
[xml]$Content = Invoke-WebRequest -Uri "https://water.weather.gov/ahps2/hydrograph_to_xml.php?gage=rmdv2&output=xml" | |
$smry = $content.site.forecast.datum.primary."#text" | measure -Minimum | |
if($smry.minimum -lt 5.5){ | |
New-BurntToastNotification -Text "Get ready to go sampling!" , | |
"Richmond-Westham is forecast to be <5.5 ft." | |
} | |
This file contains 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
## This was originally used in review, where Year was nested within Blocks | |
library(mgcv) | |
# In the BodyWeight data, Rat is nested in Diet with no repeated Rats across Diets | |
# Analogous to Year nested in Blocks with no repeated Years across Blocks | |
data('BodyWeight') | |
# Dummy code levels of Diet as for YearBlock in manuscript | |
BodyWeight$Diet1 <- ifelse(BodyWeight$Diet == 1, 0, 1) |
This file contains 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(dplyr) | |
df_north <- tibble( | |
week = 1:53, | |
N = sample(0:15, 53, replace = T) | |
) | |
df_south <- tibble( | |
week = 1:53, |