Hi,
No problem.
dat1 <-
subset(head(read.table("temp1.txt",skip=6,sep=",",header=FALSE,fill=TRUE,stringsAsFactors=FALSE),-1),select=1:4)
dat1$V1 <- as.numeric(dat1$V1)
str(dat1)
#'data.frame': 96409 obs. of 4 variables:
# $ V1: num 891231 900101 900101 900101 900101 ...
# $ V2: int 2400
Hi,
The code is based on what you pasted on the page. In the original post, you
used sep="", while the pasted data shows "," as delimiter.
dat1 <- subset(head(read.table(text="#Hogd/met, Temp, 005[M], Value
#Hogd/met, Difftemp, 051[M], Value
BA0+
1 MTEMP005 1 [deg.C]
2 MDTMP051 1 [deg.C]
EOH
8912
Hi,
Assuming that you provided the sample data from the file.
temp <- readLines(textConnection("#Hogd/met, Temp, 005[M], Value
#Hogd/met, Difftemp, 051[M], Value
BA0+
1 MTEMP005 1 [deg.C]
2 MDTMP051 1 [deg.C]
EOH
891231, 2400, -1.5, -0.21,
900101, 0100, -1.4, -0.25,
900101, 0200, -1.6, -0.28,
9001
3 matches
Mail list logo