[R] Fwd: problem importing apparently common txt files

arun smartpink111 at yahoo.com
Thu May 22 15:47:13 CEST 2014


Hi,

Check if this works:
 dat1 <- read.table("folder2.txt", header=TRUE,stringsAsFactors=FALSE,sep="\t",fileEncoding="UTF-16")


'data.frame':    79 obs. of  6 variables:
 $ Documento: chr  "6143066.17.4.12.DSC_0001.png" "6143066.17.4.12.DSC_0001.png" "6143066.17.4.12.DSC_0001.png" "6143066.17.4.12.DSC_0002.png" ...
 $ Longitud : num  8.83 8.94 NA 8.94 8.99 ...
 $ Ángulo   : num  -90 90.3 NA -89.7 -90 ...
 $ Área     : num  NA NA 551 NA NA ...
 $ Altura   : num  NA NA 16.7 NA NA ...
 $ Anchura  : num  NA NA 52.5 NA NA ...



A.K.


On Thursday, May 22, 2014 9:11 AM, zuzana zajkova <zuzulaz at gmail.com> wrote:
Dear list,

I would like to import into R studio txt files coming from Adobe photoshop.
These files contain different measures. The files are apparently common txt
files with columns separate by tab.  However with common function
read.table the import process doesn't work and weird symbols appear once
imported.  An example file is attached.

Do you have any idea what it is happening?

Thank you in advance

Zuzana



Here just a view of a file.
"Documento"    "Longitud"    "Ángulo"    "Área"    "Altura"    "Anchura"
"6143066.17.4.12.DSC_0001.png"    "8.832613"    "-90.000000"
"6143066.17.4.12.DSC_0001.png"    "8.937918"    "90.337288"
"6143066.17.4.12.DSC_0001.png"            "551.103109"    "16.736842"
"52.543860"
"6143066.17.4.12.DSC_0002.png"    "8.942544"    "-89.662891"
"6143066.17.4.12.DSC_0002.png"    "8.994992"    "-90.000000"
"6143066.17.4.12.DSC_0002.png"            "550.146507"    "16.736842"
"52.491228"
"6106937.17.4.12.DSC_0004.png"    "12.159715"    "-89.008611"
______________________________________________
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