[R] Save the elements of an atomic vector to a text fil
David Winsemius
dwinsemius at comcast.net
Mon Mar 16 22:35:00 CET 2009
<http://cran.r-project.org/doc/manuals/R-data.pdf>
--
David Winsemius
On Mar 16, 2009, at 4:35 PM, johnhj wrote:
>
> I can save a atomic vector with the write.table function so far...
>
> But how can I save 2 vectors to a text file ? I tried to do it by
> "merging"
> 2 vector to 1 vector like this here:
>
> summary_vector<-c(vector1, vector2)
>
> and tried to write the contents of summary_vector to a textfile with:
>
> write.table(summary_vector, file= "(my file etc.)")
>
> But I cann't write 2 vectors with this function to a file...
> can anybody help how to do ?
>
> greetings,
> johnh
>
>
>
>
>
>
> Usuario R wrote:
>>
>> Hi,
>>
>> take a look to
>>
>> ?write.table
>>
>> regards
>>
>>
>> 2009/3/13 johnhj <jharris at web.de>
>>
>>>
>>> Hii,
>>>
>>> I will save the elements of the vector median<-with(x, tapply(V3,
>>> grup,
>>> median)). The output of this vector is:
>>>
>>> 25 50 75 100 125 150 175 200 225 250 275 300 325
>>> 350 375
>>> 400 425 450 475 500
>>> 17.8 17.8 17.5 17.8 17.7 17.6 17.7 17.6 17.8 17.7 17.6 17.7 17.8
>>> 17.7
>>> 17.8
>>> 17.8 17.8 17.8 17.7 17.7
>>>
>>> Can anybody help me how to do it. I will save it to a text file...
>>>
>>> greetings,
>>> johnh
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Save-the-elements-of-an-atomic-vector-to-a-text-fil-tp22498222p22498222.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/Save-the-elements-of-an-atomic-vector-to-a-text-fil-tp22498222p22546554.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.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list