我想回答一些R问题 [英] I want to answer some R questions

查看:132
本文介绍了我想回答一些R问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是R技术的新手,需要以下问题的帮助答案



I am new in R technology, need help on below questions answer

Q1. A key property of vectors in R is that
a.	All element must be on the same class
b.	None of the options
c.	Element can be different class
d.	 A vector cannot have attribute like dimensions
e.	Element can only be character or numeric

Q2. What is the class of the object defined by the expression X<-c(4,"a",TRUE) in R?
a.	Logical 
b.	Numeric
c.	Character
d.	Integer
e.	Float

Q3. What would be the result of following code    x<-0:4 as.logical(x)
a.	0 1 2 3 4
b.	NA NA NA NA NA
c.	FALSE TRUE TRUE TRUE TRUE
d.	"0" "1" "2" "3" "4"

Q4. WHAT WOULD BE THE RESULT OF FOLLWOING CODE    x<-c("x","y","z") as.logical(x)
a.	NA NA NA
b.	NAN NAN NAN
c.	x y z 
d.	"x" "y" "z"

Q5. which of the following statement is correct
a.	All the options
b.	Use explicit true and false values when indication logical values
c.	R operates on named data structure
d.	rm command is used to remove objects in R

Q6. WHAT WOULD BE THE output OF FOLLWOING CODE    x<-c("a","b","c","c","d","a") x[c(1,3,4)]
a.	"a" "c" "d"
b.	"b" "c" "d"
c.	"a" "b" "c"
d.	"a" "c" "c"

Q7. which of the following while loop will print numbers from 1 to 4
a.	x<-1 while (x<5) { print(x); x<-x+1;}
b.	x<-1 while (x<5) do { print(x); x<-x+1;}
c.	x<-1 while (x<5) { x <- x+1;print(x);}
d.	x<-1 while (x<5) do {x<-x+1; print(x);}

Q8. suppose I have a vector x<-c(3,5,1,10,12,6) and I want to set all elements of this vector that are less than 6 to be equal to 0, what R code achieves this?
a.	X[x<6]==0
b.	X[x<6]<-0
c.	X[x==6]==0
d.	X[x==0]
e.	None of the above

Q9.  Which of the following statement is correct?
a.	 all the options
b.	 infinite loop should generally be avoided
c.	 controlled structure like if, while, and for are used to control the flow of an R program
d.	 the only way to exit a repeat loop is to call break

Q10. What command will you enter in R console to get help on how to quit R
e.	 man quit
f.	help q
g.	help (q)
h.	info(quit)





请帮我解答正确答案



在此先感谢



我尝试了什么:



试过的答案没有不配。我不知道正确答案



Please help me with the right answers

Thanks in Advance

What I have tried:

Tried answer didn't match. and i don't know the correct answer

推荐答案

Quote:

我想要回答一些R问题

不,你没有 - 你想让别人为你回答。



我们不做你的功课:它是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想的一样困难!



如果遇到具体问题,请询问相关问题,我们会尽力提供帮助。但是我们不打算为你做这一切!

No, you don't - you want someone else to answer them for you.

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


引用:

请帮帮我正确的答案



正确的答案与您的答案无关。由于答案反映了您的知识,他们会让您的老师发现您的弱点并采取补救措施。

您需要重新阅读课程并进行一些研究。



我们不做你的HomeWork。

HomeWork不会测试你乞求别人做你的工作的技巧。


The right answers does not matter as much as the answers being yours. As the answers reflect your knowkedge, they will heko your teacher to spot your weaknesses and apply remedy.
You need to reread your lessons and do some research.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work.


这篇关于我想回答一些R问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆