Skip to content

Commit

Permalink
Change to RnW file so new version passes vignette check
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewzm committed Apr 2, 2024
1 parent d1d9997 commit 97e4379
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 37 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: FRK
Type: Package
Title: Fixed Rank Kriging
Version: 2.2.1
Date: 2023-12-08
Version: 2.2.2
Date: 2024-02-25
Authors@R: c(
person("Andrew", "Zammit-Mangion", , "[email protected]", c("aut", "cre")),
person("Matthew", "Sainsbury-Dale", , "[email protected]", c("aut")))
Expand Down
21 changes: 10 additions & 11 deletions vignettes/FRK_intro-concordance.tex
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
\Sconcordance{concordance:FRK_intro.tex:FRK_intro.Rnw:%
1 223 1 50 0 1 7 48 1 4 0 7 1 4 0 17 1 7 0 5 1 4 0 14 1 4 0 6 1 4 %
0 8 1 7 0 12 1 4 0 10 1 15 0 8 1 4 0 12 1 6 0 15 1 16 0 8 1 4 0 6 %
1 4 0 30 1 4 0 5 1 4 0 11 1 4 0 7 1 4 0 10 1 1 22 12 1 4 0 8 1 4 0 %
8 1 4 0 14 1 4 0 12 1 4 0 13 1 8 0 12 1 3 0 9 1 1 5 19 1 13 0 8 1 %
4 0 3 1 1 6 7 1 1 11 7 1 1 5 7 1 1 7 14 1 4 0 11 1 4 0 5 1 8 0 6 1 %
4 0 8 1 4 0 6 1 4 0 15 1 4 0 12 1 4 0 10 1 15 0 7 1 4 0 6 1 4 0 6 %
1 4 0 20 1 4 0 11 1 4 0 8 1 1 9 7 1 1 6 6 1 4 0 20 1 4 0 6 1 9 0 %
12 1 4 0 8 1 4 0 6 1 4 0 10 1 4 0 25 1 4 0 10 1 1 12 22 1 4 0 21 1 %
4 0 1 1 1 10 15 1 1 6 12 1 1 3 12 1 1 4 15 1 1 27 2 1 1 52 6 1 4 0 %
19 1 4 0 8 1 1 12 10 1 4 0 7 1 4 0 12 1 4 0 10 1 3 0 3 1 1 42 5 1 %
4 0 69 1}
1 218 1 50 0 1 7 48 1 4 0 7 1 4 0 17 1 7 0 5 1 4 0 14 1 4 0 6 1 4 0 8 1 %
6 0 12 1 4 0 10 1 12 0 8 1 4 0 12 1 4 0 15 1 12 0 8 1 4 0 6 1 4 0 30 1 %
4 0 5 1 3 0 11 1 4 0 7 1 4 0 9 1 1 23 12 1 4 0 8 1 4 0 8 1 4 0 14 1 4 0 %
12 1 4 0 13 1 4 0 12 1 3 0 8 1 1 6 19 1 4 0 8 1 4 0 3 1 1 6 6 1 1 17 6 %
1 1 11 6 1 1 13 14 1 4 0 11 1 4 0 5 1 7 0 6 1 4 0 8 1 4 0 6 1 4 0 15 1 %
4 0 12 1 4 0 10 1 15 0 7 1 4 0 6 1 3 0 6 1 4 0 20 1 4 0 11 1 4 0 7 1 1 %
10 6 1 1 7 6 1 4 0 20 1 14 0 6 1 8 0 12 1 4 0 8 1 4 0 6 1 4 0 10 1 4 0 %
25 1 4 0 9 1 1 13 22 1 8 0 21 1 4 0 1 1 1 10 14 1 1 12 11 1 1 9 11 1 1 %
10 15 1 1 27 2 1 1 52 6 1 3 0 19 1 4 0 7 1 1 13 10 1 4 0 7 1 4 0 12 1 4 %
0 10 1 2 0 3 1 1 42 5 1 3 0 69 1}
82 changes: 58 additions & 24 deletions vignettes/FRK_intro.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -615,45 +615,64 @@ mumax <- quantile(X$mu,0.99)
@

<<echo=FALSE,fig.width=7,fig.height=3.5,out.width="\\linewidth",fig.pos="t!",fig.cap="CO$_2$ mole-fraction readings in ppm from the \\tt{AIRS}.\\label{fig:AIRSresults1}",fig.align="centre",dev = 'png',dpi=70>>=
g1 <- (EmptyTheme() +
geom_point(data=data.frame(AIRS_05_2003),
aes(lon,lat,
colour=pmin(pmax(
co2avgret,mumin),
df_to_plot <- data.frame(
lon = as.numeric(AIRS_05_2003$lon),
lat = as.numeric(AIRS_05_2003$lat),
co2avgret = as.numeric(AIRS_05_2003$co2avgret)
)
g1 <- (ggplot(df_to_plot) + geom_point(data = df_to_plot,
aes(lon, lat,
colour = pmin(pmax(
co2avgret, mumin),
mumax)),
pch=46) +
scale_colour_distiller(palette="Spectral",
guide_legend(title="co2 (ppm)")
) +
coord_map("mollweide")) %>%
draw_world(inc_border=TRUE) +
xlab("lon (deg)") +
ylab("lat (deg)")
pch = 46) +
scale_colour_distiller(palette = "Spectral",
name = "co2 (ppm)") +
coord_map("mollweide")) %>%
draw_world(inc_border=TRUE) +
xlab("lon (deg)") +
ylab("lat (deg)") +
theme_minimal() +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
print(g1)
@

<<echo=FALSE,fig.width=7,fig.height=3.5,out.width="\\linewidth",fig.pos="t!",fig.cap="Prediction of $\\Yvec_P$ in ppm following FRK on the \\tt{AIRS} data.\\label{fig:AIRSresults2}",fig.align="centre",dev = 'png',dpi=70>>=
g2 <- (EmptyTheme() +
g2 <- (ggplot() +
geom_polygon(data=X,
aes(lon,lat,fill=pmin(pmax(mu,mumin),mumax),group=id))+
scale_fill_distiller(palette="Spectral",name="pred. (ppm)",limits=c(mumin,mumax)) +
coord_map("mollweide")) %>%
draw_world(inc_border=TRUE)+
xlab("lon (deg)") +
ylab("lat (deg)")
ylab("lat (deg)") +
theme_minimal() +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
print(g2)
@

<<echo=FALSE,fig.keep=TRUE,fig.width=7,fig.height=3.5,out.width="\\linewidth",fig.pos="t!",fig.cap="Prediction standard error of $\\Yvec_P$ in ppm following FRK on the \\tt{AIRS} data.\\label{fig:AIRSresults3}",fig.align="centre",dev = 'png',dpi=70>>=
X$se <- pmax(sqrt(X$var),0.32)
g3 <- (EmptyTheme() +
g3 <- (ggplot() +
geom_polygon(data=X,
aes(lon,lat,fill=se,group=id))+
scale_fill_distiller(palette="BrBG",name="s.e. (ppm)") +
coord_map("mollweide")) %>%
draw_world(inc_border=TRUE)+
xlab("lon (deg)") +
ylab("lat (deg)")
ylab("lat (deg)") +
theme_minimal() +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
print(g3)
@
Expand Down Expand Up @@ -998,7 +1017,7 @@ mumax <- max(X$mu)


<<echo=FALSE, fig.keep=TRUE,fig.cap="CO$_2$ readings taken from the \\tt{AIRS} on the 04, 08 and 12 May 2003 in ppm. \\label{fig:FRK_AIRS_ST1}",fig.align="center",out.width="\\linewidth",fig.height=3,fig.width=16,fig.pos="t!",dev = 'png',dpi=70>>=
g1 <- (EmptyTheme() +
g1 <- (ggplot() +
geom_point(data=dplyr::filter(AIRS_05_2003,day %in% c(4,8,12)),
aes(lon,lat,
colour=pmin(pmax(
Expand All @@ -1007,24 +1026,34 @@ g1 <- (EmptyTheme() +
size=0.5) +
facet_grid(~day)+
scale_colour_distiller(palette="Spectral",
guide_legend(title="co2 (ppm)")) +
name="co2 (ppm)") +
coord_map("mollweide") +
xlab("lon (deg)") +
ylab("lat (deg)")) %>%
ylab("lat (deg)") +
theme_minimal() +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank()) ) %>%
draw_world(inc_border=TRUE)
print(g1)
@

<<echo=FALSE, fig.keep=TRUE,fig.cap="Prediction of $\\Yvec_P$ in ppm on 04, 08, and 12 May 2003 obtained with \\pkg{FRK} on the \\tt{AIRS} data. \\label{fig:FRK_AIRS_ST2}",fig.align="center",out.width="\\linewidth",fig.height=3,fig.width=16,fig.pos="t!",dev = 'png',dpi=70>>=
g2 <- (EmptyTheme() +
g2 <- (ggplot() +
geom_polygon(data=filter(X,(t %in% c(4,8,12)) & abs(lon) < 175),
aes(lon,lat,fill=mu,group=id))+
scale_fill_distiller(palette="Spectral",name="pred. (ppm)") +
coord_map("mollweide") +
facet_grid(~t) +
xlab("lon (deg)") +
ylab("lat (deg)")) %>%
ylab("lat (deg)") +
theme_minimal() +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())) %>%
draw_world(inc_border=FALSE)
print(g2)
Expand All @@ -1033,14 +1062,19 @@ print(g2)
<<echo=FALSE, fig.keep=TRUE,fig.cap="Prediction standard error of $\\Yvec_P$ in ppm on 04, 08 and 12 May 2003 obtained with \\pkg{FRK} on the \\tt{AIRS} data. \\label{fig:FRK_AIRS_ST3}",fig.align="center",out.width="\\linewidth",fig.height=3,fig.width=16,fig.pos="t!",dev = 'png',dpi=70>>=
X$se <- sqrt(X$var)
g3 <- (EmptyTheme() +
g3 <- (ggplot() +
geom_polygon(data=filter(X,(t %in% c(4,8,12)) & abs(lon) < 175),
aes(lon,lat,fill=se,group=id))+
scale_fill_distiller(palette="BrBG",name="s.e. (ppm)") +
coord_map("mollweide") +
facet_grid(~t) +
xlab("lon (deg)") +
ylab("lat (deg)")) %>%
ylab("lat (deg)") +
theme_minimal() +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank()) ) %>%
draw_world(inc_border=FALSE)
print(g3)
Expand Down

0 comments on commit 97e4379

Please sign in to comment.