[R] Subset creates row_names column when exported to MYSQL

Steven Kennedy stevenkennedy2263 at gmail.com
Wed Jul 6 23:17:54 CEST 2011


What function are you using to export your data.frame to MySQL?



On Wed, Jul 6, 2011 at 10:41 PM, Thiago Clark <clark.thiago at gmail.com> wrote:
> Dear R-helpers,
>
> I have a huge dataset and I create a filter selecting only the cases I want
> using:
>>data <- subset(data, data$var=='x' | data$var=='y' | data$var=='z' | ... )
>
> The problem is, when i check my new data it doen't show a row_names column
> but when the data is exported to MYSQL (using RMYSQL) it creates a column
> row_names.
>
> I've already tried
>>row.names(data)<- NULL
> tried
>>write.table
> then
>>read.table
>
> tried
>>as.matrix(data)
>
> but the row_names column does not appear in R, but appears everytime I
> export to MYSQL
>
> I've done a similar work with another dataset but the difference was that in
> the filter I used
>>data <- subset(data, substr(as.numeric(data$var),1,2==0 |
> substr(as.numeric(data$var),1,2==1 |  ... )
>
> I don't know how to get rid of that column.
>
> thanks
>
>        [[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.
>



More information about the R-help mailing list