ggplot2のディフォルトではx,y軸共に対岸の軸に補助メモリはありません。本パッケージはそんな対象軸に補助メモリを追加します。
パッケージバージョンは0.1.1。実行コマンドはwindows 7およびOS X 10.11.2のR version 3.2.3で確認しています。
パッケージのインストール
下記、コマンドを実行してください。
#パッケージのインストール install.packages("devtools") devtools::install_github("infotroph/ggplotTicks")
実行コマンド
詳細はコメント、パッケージのヘルプを確認してください。
#パッケージの読み込み library("ggplotTicks") ###データ例の作成##### n <- 10 TestData <- data.frame(Group = sample(paste0("Group ", 1:4), n, replace = TRUE), Data1 = sample(0:26, n, replace = TRUE)) ######## #ggplot2の標準プロット PlotTest <- ggplot(TestData, aes(x = Group, y = Data1)) + geom_point() #パッケージを適応 mirror_ticks(PlotTest) #Groupで分割してプロット mirror_ticks(PlotTest + facet_wrap(~Group))
出力例
・ggplot2の標準プロット

・パッケージを適応

・Groupで分割してプロット

少しでも、あなたのウェブや実験の解析が楽になりますように!!