Hi. Can you please answer to my questions about R ? 1.how can I write command for vector ? for exaple in this sample : I have this : a1 <- c (1:10) now how can I put in the vector ? bye for now, Thanks a lot. Majid. [[alternative HTML version deleted]]
Hi, On Thu, Dec 1, 2011 at 10:35 AM, " Majid " <golden_boy110 at yahoo.com> wrote:> Hi. > Can you please answer to my questions about R ? > 1.how can I write command for vector ? > > for exaple in this sample : > I have this : > a1 <- c (1:10) > now how can I put in the vector ?I'm afraid I don't understand your question. a1 is a vector that you've created. What do you want to do with it? Sarah> > bye for now, > Thanks a lot. > Majid.-- Sarah Goslee http://www.functionaldiversity.org
Hi, On Thu, Dec 1, 2011 at 2:43 PM, " Majid " <golden_boy110 at yahoo.com> wrote:> Dear Sarah. > Thanks so much,Really I am new in this software,I am wrking to learn the > software.First, you should always send your replies to the list. That way information can help others, and more people are available to provide advice. Second, is this homework? Third, see below.> I have this sample and I was checking it : > #========Generating data==============> > # in here we produce patterned data > #Do this and see what will happen: > > 1:10 > > # now put this seri in a vector > > a1 <- c (1:10) > > #=====================================> > > > #Do this and see what will happen: > seq(1, 5, 0.5) > > # now put this seri in a vector > > a2 <- c (seq(1, 5, 0.5)) > > Can you please learn me what is the matter? about these orders ?Nothing is wrong with these commands. Both make vectors. The c() is unnecessary in both cases, but still works. If this is not homework, you still need to explain what you *expect* to have happen, otherwise nobody can help you. Sarah -- Sarah Goslee http://www.functionaldiversity.org
On Thu, Dec 1, 2011 at 3:11 PM, " Majid " <golden_boy110 at yahoo.com> wrote:> Hi, > yes, It is homework,Then ask your TA/instructor for help.> > These are 2 command: > first for generating data: > (1:10) > that output is 1 2 3....10 > ok ? > second is : > a1<-c( 1:10) > what is the output ?I didnot see any thing.Exactly as it should be. There's no problem here, except that you need to read help("<-")> Thanks, > Majid. >-- Sarah Goslee http://www.functionaldiversity.org