# Connect to the database and initialize the analytics component.
con <- idaConnect("BLUDB","","")
idaInit(con)
# Create a link to a table IRIS in the database.
iris.ida <- ida.data.frame("IRIS")
# Inspect the data.
iris.ida
head(iris.ida)
dim(iris.ida)
names(iris.ida)
# Create a sub-selection.
iris.ida2 <- iris.ida[iris.ida$Species=='setosa',1:3]
dim(iris.ida2);
# Create a linear model in the database.
linModel <- idaLm(SepalWidth~SepalLength,iris.ida)
linModel
# Create a pointer to the private R object storage table of the current user.
idaList <- ida.list()
# Store the R object that contains the linear model in the
# private R object storage table of the current user.
idaList[1] <- linModel;
# Retrieve the linear model.
linModelCopy <- idaList[1];
linModelCopy
# Close the connection.
idaClose(con)Run the code above in your browser using DataLab