How to remove the obs column in R?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to remove the obs column in R?

killerkarthick
From the following image I need to remove the obs column for my documentation purpose.Please reply me..................................
Reply | Threaded
Open this post in threaded view
|

Re: How to remove the obs column in R?

Rui Barradas
Hello,

Try the following.

BOD <- data.frame(Time = 1:3, demand=runif(3))
mat <- data.matrix(BOD)
rownames(mat) <- rep("", nrow(mat))
mat

Rui Barradas
Em 08-10-2012 04:33, killerkarthick escreveu:

> >From the following image I need to remove the obs column for my documentation
> purpose.Please reply me..................................
> <http://r.789695.n4.nabble.com/file/n4645382/data.png>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-remove-the-obs-column-in-R-tp4645382.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: How to remove the obs column in R?

arun kirshna
In reply to this post by killerkarthick
Hi,
You can try this as well:
BOD<-data.frame(Time=c(1,2,3,4,5,7),demand=c(8.3,10.3,19.0,16.0,15.6,19.8))
mat<-as.matrix(BOD)
write.table(mat,file="matwithoutrow.txt",row.names=F,quote=F)
 print(write.table(mat,row.names=F,quote=F))
#Time demand
#1 8.3
#2 10.3
#3 19
#4 16
#5 15.6
#7 19.8
A.K.




----- Original Message -----
From: killerkarthick <[hidden email]>
To: [hidden email]
Cc:
Sent: Sunday, October 7, 2012 11:33 PM
Subject: [R] How to remove the obs column in R?

>From the following image I need to remove the obs column for my documentation
purpose.Please reply me..................................
<http://r.789695.n4.nabble.com/file/n4645382/data.png>



--
View this message in context: http://r.789695.n4.nabble.com/How-to-remove-the-obs-column-in-R-tp4645382.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: How to remove the obs column in R?

killerkarthick
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi... Arun,
           Thanks for your good answer..
Reply | Threaded
Open this post in threaded view
|

Re: How to remove the obs column in R?

killerkarthick
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by Rui Barradas
Hi Rui Barradas,
Thank you for your wonderful answer !!!!!!!.