Error message when importing R iris database

UserBird
UserBird Dataiker, Alpha Tester Posts: 535 Dataiker
edited July 16 in Using Dataiku

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

Tagged:

Answers

  • Mattsco
    Mattsco Dataiker, Registered Posts: 125 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

  • mlaur
    mlaur Registered Posts: 2 ✭✭✭✭
    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 :)
Setup Info
    Tags
      Help me…