And thanks fo rthe pointer to the R introduction book as well

On Thu, Nov 24, 2011 at 11:00 AM, Mark Murphy <markm0705@gmail.com> wrote:

> Thank you
>
>
> On Thu, Nov 24, 2011 at 7:31 AM, B77S [via R] <
> ml-node+s789695n4102066h98@n4.nabble.com> wrote:
>
>> out <- vector("list")
>> Ylab <- for(i in 1:length(BndY))
>> {
>> out[i] <- paste(BndY[i]," to ",BndY[i],"mN")
>> }
>>
>> Ylab <- do.call(c, out)
>>
>>
>>
>>
>>
>>  markm0705 wrote
>> Dear R helpers
>>
>> I'm trying to make up some labels for plot from this vector
>>
>> BndY<-seq(from = 18900,to= 19700, by = 50)
>>
>> using
>>
>> Ylab<-for(i in BndY) {c((paste(i," to ",i+50,"mN")))}
>>
>> but the vector created is NULL
>>
>> However if i use
>>
>> for(i in BndY) {print(c(paste(i," to ",i+50,"mN")))}
>>
>> I can see the for loop is making the labels I'm looking for but not sure
>> on my error in assigning them to a vector
>>
>> Thanks in advance
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>> http://r.789695.n4.nabble.com/Looping-and-paste-tp4101892p4102066.html
>> To unsubscribe from Looping and paste, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4101892&code=bWFya20wNzA1QGdtYWlsLmNvbXw0MTAxODkyfDExNDQyODMxMDM=>
>> .
>> NAML<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>


--
View this message in context: http://r.789695.n4.nabble.com/Looping-and-paste-tp4101892p4102570.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

