Re: [R] coercion

From: Petr Savicky <savicky_at_praha1.ff.cuni.cz>
Date: Wed, 20 Apr 2011 12:07:10 +0200

On Wed, Apr 20, 2011 at 11:26:19AM +0430, Stat Consult wrote:
> Dear ALL
>
> I don't know why I can see this error in run this sentences.
>
> In paste("V", 1L:cols, sep = "") : NAs introduced by coercion

Check, what "cols" is. This warning may be obtained, if "cols" is a character value. For example

  cols <- "a"
  paste("V", 1L:cols, sep = "")

  Error in 1L:cols : NA/NaN argument
  In addition: Warning message:
  In paste("V", 1L:cols, sep = "") : NAs introduced by coercion

> DATA<-read.delim ("D:\\DATA\\GeneExpression.txt",header=FALSE)

What is the relationship of this to the command above?

If you include a reproducible example, you have a better chance to get a useful answer.

Petr Savicky.



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 Wed 20 Apr 2011 - 10:28:35 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 20 Apr 2011 - 10:40:31 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