Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meshcodeクラス #49

Merged
merged 10 commits into from Nov 20, 2020
Merged

meshcodeクラス #49

merged 10 commits into from Nov 20, 2020

Conversation

uribo
Copy link
Owner

@uribo uribo commented Nov 20, 2020

Summary

vctrsパッケージを使ってメッシュコードのクラス meshcodeを用意。meshcode()によって任意のmeshcodeオブジェクトを作成できる。複数のサイズのメッシュコードをベクトルに含めることも可能。

meshcodeクラスはmesh_code (文字列)とmesh_size (実数)の2つの属性を持つ。

library(jpmesh)
m <- meshcode("6441")
m
#> <meshcode[1]>
#> [1] 6441

vctrs::fields(m)
#> [1] "mesh_code" "mesh_size"

vctrs::field(m, "mesh_code")
#> [1] "6441"
vctrs::field(m, "mesh_size")
#> [1] 80

これまでにjpmeshで対応していたいずれのメッシュサイズ(80km,10km,1km,500m,250m,125m)においてもmeshcodeクラスは対応する。

Related issues

Close #48

@uribo uribo merged commit 24ea0d7 into master Nov 20, 2020
@uribo uribo deleted the feature/vctrs branch November 20, 2020 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support to vctrs
1 participant