1 / 2

「 R 入門」 10 月 10 日分宿題解答

「 R 入門」 10 月 10 日分宿題解答. 10 月 16 日(木) 発表者 新納浩幸. 宿題解答. (1). [ “X1”, “X2”, ..., “X100”, “Y1”, “Y2”, ..., “Y100”, “Z1”, “Z2”, ..., “Z100” ] という 300 次元のベクトルを作成せよ。. c(paste(”X”,1:100,sep=””), paste(”Y”,1:100,sep=””),paste(”Z”,1:100,sep=””)). ( 2 ). 100 から 200 までの整数値の総和を求めよ。. 15150.

alea-durham
Download Presentation

「 R 入門」 10 月 10 日分宿題解答

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 「R入門」10月10日分宿題解答 10月16日(木) 発表者 新納浩幸

  2. 宿題解答 (1) [ “X1”, “X2”, ..., “X100”, “Y1”, “Y2”, ..., “Y100”, “Z1”, “Z2”, ..., “Z100” ] という300次元のベクトルを作成せよ。 c(paste(”X”,1:100,sep=””), paste(”Y”,1:100,sep=””),paste(”Z”,1:100,sep=””)) (2) 100 から 200 までの整数値の総和を求めよ。 15150 sum(100:200) (3) 10000 ~ 100000 の整数の中で、13の倍数の数値はいくつあるかを 調べよ x ← seq(0,100000,by=13) length(x[x > 10000]) 6923 あるいは length(seq(0,100000,by=13)) – length(seq(0,10000,by=13))

More Related