博文

目前显示的是 四月, 2025的博文

open remote wsl for positron install

图片
  1 、安装 Positron 2 、 Positron 中安装 kv9898.open-remote-wsl-0.0.9.vsix 扩展 3 、 Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) Run the command:   Register this WSL extension for launching Positron from WSL 4 、打开虚拟网卡模式和 Ubuntu , Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) Run the command:   Remote-WSL Connect to WSL

INLA mesh

 library(INLA) library(sf) library(gstat) library(tidyverse) data(sic97) # 直接在一个流程中准备全部数据 df_rain <- sic_full %>%    st_as_sf() %>%    mutate(     altitude = raster::extract(raster::raster(demstd), as.matrix(st_coordinates(.))),     coords = st_coordinates(.)   ) %>%    mutate(     lat = coords[, 1] / 1000,     lon = coords[, 2] / 1000   ) %>%    dplyr::select(ID, rainfall, altitude, lat, lon) # 检查空间依赖性 df_rain %>%     as_Spatial() %>%   variogram(rainfall ~ 1, data = .) %>%   graphics::plot() # 创建网格 loc <- cbind(df_rain$lat, df_rain$lon) Mesh <- inla.mesh.2d(   loc.domain = loc,   max.edge = c(20, 100),   cutoff = 1 ) ggplot() +   inlabru::gg(Mesh) +   geom_point(data = data.frame(x = loc[,1], y = loc[,2]),              aes(x = x, y = y), color = "red", shape = 1) +   theme_...