全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
1174 0
2012-07-11

1.In a single figure, plotthe functions sin, cos, and sin+cos with different colors and line styles, Use 1000 points inthe interval [-10, 10] and label the figure with a title, subtitle, and axislabels
2.Construct two vectors, xand y , such that the S-PLUS command

  >plot( x  ,   y, type=‘ l  ’)

  createsthe following figures:

  a) arectangle or square

  b) acircle

  c) aspiral

  Hint:Do not think of y as being a function of x ( in a mathematicalsense), but think of how the trace of the figure can be created. For drawingcircles you might use the property that, for any x, a point ( sin(x), cos(x)) lies on the unitcircle with origin(0,0) and radius 1.
3.Examinethe data set singer. The variable voice.part is afactor with eight levels, Soprano 1and 2, Alto 1and 2, Tenor 1and 2, and Bass 1and 2. Reduce the levels in voice.part to four levels only by putting Soprano 1andSoprano 2into a Soprano category, Alto 1 and Alto 2 into an Alto category, andso on.
      Graph the data in a Trellishistogram.  Hint: Check for the levels of thefactor variable by using the levels function. Convert the factor variable thatis internally coded as integer to integer numbers and use cut for regroupingthe data



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群