Wednesday, September 15, 2010

Read data from text file

Baca data dari fail text dengan pemisah adalah tab (tab separator)

> fusiondata = read.table("C:\\Datasets\\run1_train.txt",header=T,sep="\t")

Paparkan sebahagian data dari baris 1 ke baris 8:

> fusiondata[1:8,]

ANN_PREDICTED MIP_PREDICT GBT_PREDICT TARGET
1 0.5013140 0.0051 0.0323186 0
2 0.5015325 0.0051 0.0323186 0
3 0.5057989 0.0051 0.0323186 0
4 0.4961194 0.0109 0.0323186 0
5 0.5018118 0.0051 0.0323186 0
6 0.5024724 0.0109 0.0323186 0
7 0.4986205 0.0051 0.0323186 0
8 0.5017849 0.0051 0.0323186 0

No comments:

Post a Comment