# set up the XOR problem inputs and outputs
inp <- c(0, 0, 1, 1, 0, 1, 0, 1)
dim(inp) <- c(4, 2)
outp <- c(0, 1, 1, 0)
dim(outp) <- c(4, 1)
# write dataset
write.fcnndataset("xor.dat", inp, outp)
# show the output file
file.show("xor.dat")
# read dataset
xordf <- read.fcnndataset("xor.dat")
# show the imported dataset
show(xordf)
Run the code above in your browser using DataLab