{"id":1643,"date":"2022-07-26T23:16:29","date_gmt":"2022-07-26T14:16:29","guid":{"rendered":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/?p=1643"},"modified":"2022-07-26T23:22:22","modified_gmt":"2022-07-26T14:22:22","slug":"r%e3%81%ae%e3%83%91%e3%83%83%e3%82%b1%e3%83%bc%e3%82%b8-sf-%e3%82%92%e3%82%b3%e3%83%b3%e3%83%91%e3%82%a4%e3%83%ab%e3%81%a7%e3%81%8d%e3%81%aa%e3%81%84","status":"publish","type":"post","link":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/?p=1643","title":{"rendered":"R\u306e\u30d1\u30c3\u30b1\u30fc\u30b8 &#8220;sf&#8221; \u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u306a\u3044"},"content":{"rendered":"<p>R\u306e\u30d1\u30c3\u30b1\u30fc\u30b8 &#8220;sf&#8221; \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u30d0\u30a4\u30ca\u30ea\u30fc\u7248\u3088\u308a\u30bd\u30fc\u30b9\u7248\u306e\u307b\u3046\u304c\u65b0\u3057\u304b\u3063\u305f\u306e\u3067\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u30a8\u30e9\u30fc\u306e\u305f\u3081\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>RStudio\u3067\uff1a<\/p>\n<pre>&gt; install.packages(\"sf\")\r\n \u4f9d\u5b58\u5bfe\u8c61 (dependency) \u2018wk\u2019, \u2018classInt\u2019, \u2018s2\u2019, \u2018units\u2019 \u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059 \r\n\r\n\r\n  \u5229\u7528\u3067\u304d\u308b\u30d0\u30a4\u30ca\u30ea\u30fc\u7248\u304c\u3042\u308a\u307e\u3059\u304c\u30bd\u30fc\u30b9\u7248\u306f\u5f8c\u8005\u3067\u3059:\r\n   binary source needs_compilation\r\nsf  1.0-7  1.0-8              TRUE\r\n\r\n \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u304b? (\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u5fc5\u8981\u3067\u3059)  (Yes\/no\/cancel) yes\r\n URL 'https:\/\/cran.rstudio.com\/bin\/macosx\/contrib\/4.2\/wk_0.6.0.tgz' \u3092\u8a66\u3057\u3066\u3044\u307e\u3059 \r\n\r\n...\u7565...\r\n\r\nconfigure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++11\r\n<span style=\"color: #ff0000;\">checking for gdal-config... no\r\nno\r\nconfigure: error: gdal-config not found or not executable.<\/span>\r\n<span style=\"color: #ff0000;\">ERROR: configuration failed for package \u2018sf\u2019<\/span>\r\n* removing \u2018\/Library\/Frameworks\/R.framework\/Versions\/4.2\/Resources\/library\/sf\u2019\r\nWarning in install.packages :\r\n   \u30d1\u30c3\u30b1\u30fc\u30b8 \u2018sf\u2019 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001\u30bc\u30ed\u3067\u306a\u3044\u7d42\u4e86\u5024\u3092\u3082\u3061\u307e\u3057\u305f \r\n\r\n \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001\u4ee5\u4e0b\u306b\u3042\u308a\u307e\u3059 \r\n \t\u2018\/private\/var\/folders\/19\/_1vh1zln4nv6mht93knpn2m00000gn\/T\/RtmpMVnVVL\/downloaded_packages\u2019<\/pre>\n<p>\u30a8\u30e9\u30fc\u3092\u307f\u308b\u3068\u3001gdal-config\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u306a\u3044\u304b\u5b9f\u884c\u3067\u304d\u306a\u3044\u3089\u3057\u3044\u3002<\/p>\n<p>\u8ae6\u3081\u3066\u30d0\u30a4\u30ca\u30ea\u30fc\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u3001\u3068\u308a\u3042\u3048\u305a\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u554f\u984c\u306f\u89e3\u6c7a\u3059\u308b\u3002\u3057\u304b\u3057\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u3044\u3061\u3044\u3061\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u304b\u3092\u8a0a\u304b\u308c\u308b\u306e\u306f\u7169\u308f\u3057\u3044\u306e\u3067\u3001\u5c11\u3057\u8a66\u3057\u3066\u307f\u308b\u3002<\/p>\n<p>&#8220;rgdal&#8221; \u3068\u3044\u3046\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u3042\u308b\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u8a66\u3059\u3068\u3001\u540c\u3058\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002gdal\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3088\u3046\u3060\u3002<\/p>\n<pre>...\u7565...\r\nconfigure: rgdal: 1.5-32\r\nchecking for \/usr\/bin\/svnversion... no\r\nconfigure: svn revision: 1176\r\nchecking for gdal-config... no\r\nno\r\n<span style=\"color: #ff0000;\">checking for gdal-config... no\r\nno\r\nconfigure: error: gdal-config not found or not executable.<\/span>\r\n<span style=\"color: #ff0000;\">ERROR: configuration failed for package \u2018rgdal\u2019<\/span>\r\n* removing \u2018\/Library\/Frameworks\/R.framework\/Versions\/4.2\/Resources\/library\/rgdal\u2019\r\nWarning in install.packages :\r\n   \u30d1\u30c3\u30b1\u30fc\u30b8 \u2018rgdal\u2019 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001\u30bc\u30ed\u3067\u306a\u3044\u7d42\u4e86\u5024\u3092\u3082\u3061\u307e\u3057\u305f \r\n\r\n \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001\u4ee5\u4e0b\u306b\u3042\u308a\u307e\u3059 \r\n \t\u2018\/private\/var\/folders\/19\/_1vh1zln4nv6mht93knpn2m00000gn\/T\/RtmpMVnVVL\/downloaded_packages\u2019<\/pre>\n<p><a href=\"https:\/\/brew.sh\/index_ja\" target=\"_blank\" rel=\"noopener\">Homebrew<\/a>\u306bgdal\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b\u3002\uff08Homebrew\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\uff09<\/p>\n<p><a href=\"https:\/\/ja.wikipedia.org\/wiki\/GDAL\" target=\"_blank\" rel=\"noopener\">gdal<\/a>\u306f\u5730\u7406\u7a7a\u9593\u60c5\u5831\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u5909\u63db\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3089\u3057\u3044\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3067\uff1a<\/p>\n<pre>% brew install gdal<\/pre>\n<p>\u3075\u305f\u305f\u3073RStudio\u3067&#8221;sf&#8221;\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b\u3068\u3001\u5b8c\u4e86\u3057\u305f\u3002<\/p>\n<p>gdal\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001\u3069\u308c\u3082\u6642\u9593\u304c\u304b\u304b\u308b\u3002\u30d0\u30a4\u30ca\u30ea\u30fc\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3057\u307e\u3046\u306e\u304c\u3068\u308a\u3042\u3048\u305a\u306f\u65e9\u3044\u3002<\/p>\n<p><a href=\"https:\/\/ill-identified.hatenablog.com\/entry\/2020\/12\/07\/134705\" target=\"_blank\" rel=\"noopener\">sf\u3092\u4f7f\u3063\u3066\u65e5\u672c\u5730\u56f3<\/a>\u3092\u63cf\u3044\u3066\u307f\u305f\u3002<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/anatomy.med.gunma-u.ac.jp\/protocols\/wp-content\/uploads\/2022\/07\/Rplot.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full wp-image-1644\" src=\"https:\/\/i0.wp.com\/anatomy.med.gunma-u.ac.jp\/protocols\/wp-content\/uploads\/2022\/07\/Rplot.png?resize=840%2C596\" alt=\"\" width=\"840\" height=\"596\" srcset=\"https:\/\/i0.wp.com\/anatomy.med.gunma-u.ac.jp\/protocols\/wp-content\/uploads\/2022\/07\/Rplot.png?w=1059&amp;ssl=1 1059w, https:\/\/i0.wp.com\/anatomy.med.gunma-u.ac.jp\/protocols\/wp-content\/uploads\/2022\/07\/Rplot.png?resize=300%2C213&amp;ssl=1 300w, https:\/\/i0.wp.com\/anatomy.med.gunma-u.ac.jp\/protocols\/wp-content\/uploads\/2022\/07\/Rplot.png?resize=1024%2C727&amp;ssl=1 1024w, https:\/\/i0.wp.com\/anatomy.med.gunma-u.ac.jp\/protocols\/wp-content\/uploads\/2022\/07\/Rplot.png?resize=768%2C545&amp;ssl=1 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>R\u306e\u30d1\u30c3\u30b1\u30fc\u30b8 &#8220;sf&#8221; \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u30d0\u30a4\u30ca\u30ea\u30fc\u7248\u3088\u308a\u30bd\u30fc\u30b9\u7248\u306e\u307b\u3046\u304c\u65b0\u3057\u304b\u3063\u305f\u306e\u3067\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u30a8\u30e9\u30fc\u306e\u305f\u3081\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u3044\u3002 RSt<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[7],"tags":[],"class_list":["post-1643","post","type-post","status-publish","format-standard","hentry","category-computer-internet"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4fFyn-qv","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=\/wp\/v2\/posts\/1643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1643"}],"version-history":[{"count":4,"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=\/wp\/v2\/posts\/1643\/revisions"}],"predecessor-version":[{"id":1648,"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=\/wp\/v2\/posts\/1643\/revisions\/1648"}],"wp:attachment":[{"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anatomy.med.gunma-u.ac.jp\/protocols\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}