> search()
> searchpaths() # インストール場所の絶対パスを得る
# あるライブラリ中のオブジェクトの一覧を見る library(help=パッケージ名)
# もちろんそのライブラリが既にインストールされている必要があります。
> library(gstat) # ライブラリ gstat をロード
> library(help=gstat) # gstat 中のオブジェクト(関数、データセット)の一覧を得る
─ Attaching packages ─────────────────────────────────────────────────── tidyverse 1.3.0 ─
✓ tibble 3.1.0 ✓ dplyr 1.0.5
✓ tidyr 1.1.3 ✓ stringr 1.4.0
✓ readr 1.4.0 ✓ forcats 0.5.1
✓ purrr 0.3.4
─ Conflicts ───────────────────────────────────────────────────── tidyverse_conflicts() ─
x stringr::boundary() masks strucchange::boundary()
x dplyr::filter() masks stats::filter()
x dplyr::first() masks xts::first()
x dplyr::lag() masks stats::lag()
x dplyr::last() masks xts::last()
x dplyr::select() masks MASS::select()
> data(mtcars)
> mtcars <- as_tibble(mtcars, rownames = "model") %>% mutate(cyl = as.character(cyl))
> g <- ggplot(mtcars, aes(x = mpg, y = wt, color = cyl)) +
+ geom_text(aes(label = model), family = family_sans, fontface = "plain") +
+ labs(x =paste(family_serif, "ボールドを使用"), y = paste(family_serif, "イタリックを使用"),
+ title = paste(family_serif, "ボールドイタリックを使用")) +
+ annotate("text", x = 10, y = 2, label = paste(family_sans, "標準書体を使用"), hjust = 0) +
+ theme(
+ text = element_text(family = family_serif, face = "plain"),
+ title = element_text(face = "bold.italic"),
+ axis.title = element_text(face = "italic"),
+ axis.title.x = element_text(face = "bold")
+ )
> g
Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
polygon edge not found
In addition: There were 50 or more warnings (use warnings() to see the first 50)
> g <- ggplot(mtcars, aes(x = mpg, y = wt, color = cyl)) +
+ geom_text(aes(label = model), family = family_sans, fontface = "plain") +
+ labs(x =paste(family_serif, "ボールドを使用"), y = paste(family_serif, "イタリックを使用"),
+ title = paste(family_serif, "ボールドイタリックを使用")) +
+ annotate("text", x = 10, y = 2, label = paste(family_sans, "標準書体を使用"), hjust = 0) +
+ theme(
+ text = element_text(family = family_serif, face = "plain"),
+ title = element_text(face = "bold.italic"),
+ axis.title = element_text(face = "italic"),
+ axis.title.x = element_text(face = "bold")
+ )
> g
Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
polygon edge not found
In addition: Warning message:
In grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "Hiragino Mincho ProN"
> last(dmdf[,13],10) # blocked by dplyr
Error in order(order_by)[[n]] : subscript out of bounds
> detach("package:tidyverse", unload=TRUE)
> last(dmdf[,13],10)
Error in order(order_by)[[n]] : subscript out of bounds
> search()
[1] ".GlobalEnv" "package:forcats" "package:stringr" "package:dplyr" "package:purrr" "package:readr"
[7] "package:tidyr" "package:tibble" "package:RColorBrewer" "package:ggplot2" "tools:rstudio" "package:datasets"
[13] "package:beepr" "package:forecast" "package:mondate" "package:vars" "package:lmtest" "package:urca"
[19] "package:strucchange" "package:sandwich" "package:MASS" "package:utils" "package:graphics" "package:grDevices"
[25] "package:quantmod" "package:TTR" "package:xts" "package:zoo" "package:stats" "package:methods"
[31] "Autoloads" "package:base"
> detach("package:dplyr", unload=TRUE)
Warning message:
‘dplyr’ namespace cannot be unloaded:
namespace ‘dplyr’ is imported by ‘dbplyr’, ‘broom’, ‘tidyr’ so cannot be unloaded
> detach("package:tidyr", unload=TRUE)
Warning message:
‘tidyr’ namespace cannot be unloaded:
namespace ‘tidyr’ is imported by ‘broom’ so cannot be unloaded
> detach("package:broom", unload=TRUE)
Error in detach("package:broom", unload = TRUE) : invalid 'name' argument
> detach("package:tidyr", unload=TRUE)
Error in detach("package:tidyr", unload = TRUE) : invalid 'name' argument
> detach("package:dplyr", unload=TRUE)
Error in detach("package:dplyr", unload = TRUE) : invalid 'name' argument
> last(dmdf[,13],10)
[1] 7 18 6 7 15 16 20 12 10 23
0 件のコメント:
コメントを投稿