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

rebel(row|col_merged = ) を rebel(row_header = 1:5, col_header = 1:3) のように変更する #130

Closed
Rindrics opened this issue Jul 5, 2019 · 10 comments

Comments

@Rindrics
Copy link
Owner

Rindrics commented Jul 5, 2019

また pos っちゃった

@Rindrics
Copy link
Owner Author

Rindrics commented Jul 5, 2019

#88 の議論を活かしたいが,ここでは along というニュアンスは適さない.

@Rindrics
Copy link
Owner Author

Rindrics commented Jul 5, 2019

この例では,「鉛直」方向にセル結合されているので,それを解除したい.
image

@Rindrics
Copy link
Owner Author

Rindrics commented Jul 5, 2019

これと戦う単機能関数は,unmerge_vert()
https://github.com/kikirinrin/lucifer/blob/d0e36fcc51153bbbd4b0308072e816c03c544a9d/R/shapetools.R#L59-L66

これも unmerge() に抽象化したほうがいいのかな

@Rindrics
Copy link
Owner Author

Rindrics commented Jul 5, 2019

少なくとも,複数行|列に対応させないといけない

@akimanabe
Copy link
Collaborator

akimanabe commented Jul 6, 2019

これは dirpos 不可避案件ですね・・・
うーん 🤔

@Rindrics
Copy link
Owner Author

Rindrics commented Jul 6, 2019

うーむ

@Rindrics
Copy link
Owner Author

Rindrics commented Jul 6, 2019

cluster の検索列を最左にすると情報が損失することがあるので,複数の行ヘッダがある時には空気読むような実装にしたい

@Rindrics
Copy link
Owner Author

解決の方向性が見えたつもりでいたが,やはりだめ.
上の例では,鉛直方向のセル結合が目立つが,水平方向にもセル結合されている.
実際にコーディングしていて混乱した.

  • unmerge_header = list(header_of = "row", pos = 1:5) <- これは結合がおきているのが1:5列目であると言っている.
    pos は '行' を指定しているわけではない.
    なぜなら,行ヘッダだから.行15は結合されているけど,630は結合されてないっす,なんてことは起きない.

@Rindrics
Copy link
Owner Author

書いていて思ったのが,結合の有無にかかわらず,複数行|列ヘッダの範囲をしていするようにしたらどうだろう.
うえの農林統計の例だと

  • row_header = 1:5
  • col_header = 1:3 (画像にはないが)

セル結合の有無にかかわらず,複数次元ヘッダを毎回整形するようにすれば,

  • きれいなデータには何も起きない(同じもので上書きされる)
  • 汚いデータを少ない引数で整形できる
    メリットを享受できる

@Rindrics Rindrics changed the title rebel(row|col_merged = ) を rebel(unmerge = list(dir = "v", pos = 1)) あれっ rebel(row|col_merged = ) を rebel(row_header = 1:5, col_header = 1:3) のように変更する Jul 11, 2019
@Rindrics
Copy link
Owner Author

長くなったので別Issueへ

@Rindrics Rindrics mentioned this issue Jul 30, 2019
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

No branches or pull requests

2 participants