Error message when importing R iris database

UserBird
Dataiker
Error message when importing R iris database

Hi,



I would like to work on the iris database which is in R, but when I run the command :




library(dataiku)
data <- dkuReadDataset("iris", samplingMethod="head")

I get an error like this :

Error in dku__check_api_error(resp, "Failed to read dataset"): Failed to read dataset (HTTP code 404): dataset does not exist: TEST_DATAIKU.iris
Traceback:

1. dkuReadDataset("iris", samplingMethod = "head")
2. dku__check_api_error(resp, "Failed to read dataset")
3. stop(error)


 



Would you help me with this ?



Thanks

0 Kudos
2 Replies
Mattsco
Dataiker

Hi, 



The dkuReadDataset function is a dataiku function, to load a dataset with it, the dataset must be in the flow of your project.



But to load the iris dataset, you can do:




library(datasets)
data(iris)


As it is described here



Note that you can use the R notebook to work in R in DSS.



Matt 



 



 

Mattsco
mlaur
Level 1
I'm already using the R notebook but I would like to use Dataiku functions to become familiar with them.
Btw I understand the process to load R database.
Thank you Matt ๐Ÿ™‚
0 Kudos