私のデータセットは、私はトレーニングセットの最初の数字を言う視覚化するimage
機能を使用しようとしていますKaggleR - イメージプロットMNISTデータセット
からMNISTです。残念ながら、私は次のエラーを取得しています:
>image(1:28, 1:28, im, col=gray((0:255)/255))
Error in image.default(1:28, 1:28, im, col = gray((0:255)/255)) :
'z' must be numeric or logical
は、いくつかのコードを追加:
rawfile<-read.csv("D://Kaggle//MNIST//train.csv",header=T) #Reading the csv file
im<-matrix((rawfile[1,2:ncol(rawfile)]), nrow=28, ncol=28) #For the 1st Image
image(1:28, 1:28, im, col=gray((0:255)/255))
Error in image.default(1:28, 1:28, im, col = gray((0:255)/255)) :
'z' must be numeric or logical