Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
この質問から、私がコードについてあまり知らないことがわかるでしょう。私の質問はこれです:
このコードはどういう意味ですか?
mnlong <- 280.460 + .9856474 * time mnlong <- mnlong %% 360 mnlong[mnlong < 0] <- mnlong[mnlong < 0] + 360
mnlongとtimeが変数であることは理解していますが、 は%%混乱します。
mnlong
time
%%
誰かが私に基本的な説明をしてもらえますか?
ほとんどの場合、%%はモジュロによる整数除算を意味します。結果は0..360の範囲内です。これは、0..360度以内にしか収まらないlongitute foの例のように、ある値が妥当な範囲から外れない場合に使用されます。
ここでの言語は R または S/Splus のいずれかであるという知識に基づいた推測を行います。他の人が言ったように: %% は mod オペレーターです。