Dear group,
Here is my df, trades1 : trades1 <- structure(list(Instrument.Long.Name = c("CORN", "CORN", "CORN", "CORN", "CORN", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "STANDARD LEAD USD", "STANDARD LEAD USD", "SPCL HIGH GRADE ZINC USD", "SPCL HIGH GRADE ZINC USD", "SPCL HIGH GRADE ZINC USD", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)", "ROBUSTA COFFEE (10)"), Buy.Sell..Cleared. = c("Buy", "Buy", "Sell", "Buy", "Sell", "Buy", "Buy", "Buy", "Buy", "Sell", "Sell", "Buy", "Sell", "Buy", "Sell", "Sell", "Buy", "Buy", "Buy", "Buy", "Buy", "Buy", "Buy", "Buy"), Volume = c(1L, 1L, 5L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), Price = c("361.5000", "361.5000", "361.0000", "372.5000", "374.0000", "990.0000", "992.2500", "995.2500", "995.7500", "992.2500", "997.5000", "2,251.5000", "2,369.5000", "2,406.0000", "2,421.5000", "2,448.5000", "1,380.0000", "1,383.0000", "1,383.0000", "1,386.0000", "1,386.0000", "1,388.0000", "1,389.0000", "1,389.0000" ), Net.Charges..sum. = c(-4.32, -4.32, -21.6, -4.32, -4.32, -4.32, -4.32, -4.32, -4.32, -4.32, -4.32, -12.5, -12.5, -12.5, -12.5, -12.5, -3.3, -3.3, -3.3, -3.3, -3.3, -3.3, -3.3, -3.3)), .Names = c("Instrument.Long.Name", "Buy.Sell..Cleared.", "Volume", "Price", "Net.Charges..sum."), class = "data.frame", row.names = c(NA, -24L)) I got it from this command line : >trades1=read.csv2("LSCTrades.csv",dec=".",sep=",",as.is=T,h=T,skip=1) The csv file has some numbers with thousands separator as a ".", so the class for my "Price" column is character, when I want it numeric. I can't change the column class, even when playing with the read.csv or as.numeric commands and all their arguments. Any help would be appreciate. *************************** Arnaud Gaboury Mobile: +41 79 392 79 56 BBM: 255B488F *************************** [[alternative HTML version deleted]] ______________________________________________ R-help@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.