Re: [R] add string to a list

From: Chris82 <rubenbauar_at_gmx.de>
Date: Tue, 25 Nov 2008 14:34:11 -0800 (PST)

Thanks!

really a simple solution.

regards

Jorge Ivan Velez wrote:
>
> Dear Chris82,
> Try this:
>
> input <- readLines(con,n=224)
> x <- "\004"
> input[225]<-x
> input
>
> HTH,
>
> Jorge
>
>
>
>
> On Tue, Nov 25, 2008 at 4:37 PM, Chris82 <rubenbauar_at_gmx.de> wrote:
>

>>
>> hello R users,
>>
>> I didn't find a solution for a simple problem I think.
>>
>> I read 224 lines from a file
>>
>> input <- readLines(con,n=224)
>>
>> and now I create a string x <- "\004" which should be line 225 of input.
>>
>> So I have input and x and want to add x to input, so that it looks like
>> this:
>>
>> [1] "string"
>> [2] "string"
>> .
>> .
>> .
>> [224] "string"
>> [225] "\004"
>>
>> thanks
>> --
>> View this message in context:
>> http://www.nabble.com/add-string-to-a-list-tp20690084p20690084.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>

>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
-- 
View this message in context: http://www.nabble.com/add-string-to-a-list-tp20690084p20690995.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 25 Nov 2008 - 22:36:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 26 Nov 2008 - 00:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive