5.1.2.1 Select Data by Column
This example selects columns from an ore.frame object.
               
Example 5-1 Selecting Data by Column
This example first creates a temporary database table, with the corresponding proxy ore.frame object iris_of, from the iris data.frame object. It displays the first three rows of iris_of. The example selects two columns from iris_of and creates the ore.frame object iris_projected with them. It then displays the first three rows of iris_projected.
                  
iris_of <- ore.push(iris)
head(iris_of, 3)
iris_projected = iris_of[, c("Petal.Length", "Species")]
head (iris_projected, 3)Listing for This Exampleiris_of <- ore.push(iris)
head(iris_of, 3)
  Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1          5.1         3.5          1.4         0.2  setosa
2          4.9         3.0          1.4         0.2  setosa
3          4.7         3.2          1.3         0.2  setosa
R> iris_projected = iris_of[, c("Petal.Length", "Species")]
R> head (iris_projected, 3)
  Petal.Length Species
1          1.4  setosa
2          1.4  setosa
3          1.3  setosaParent topic: Select Data