Re: [R] Difference subsetting (dataset$variable vs. dataset["variable"]

2016-05-31 Thread Jeff Newmiller
You were clearly mistaken. dataframe$column is almost the same as dataframe[["column"]], except that the $ does partial matching. Both of these "extract" a list element. A data frame is a list where all elements are vectors of the same length. A list is a vector where each element can refer

[R] Difference subsetting (dataset$variable vs. dataset["variable"]

2016-05-31 Thread G . Maubach
Hi All, I thought dataset$variable is the same as dataset["variable"]. I tried the following: > str(ZWW_Kunden$Branche) chr [1:49673] "231" "151" "151" "231" "231" "111" "231" "111" "231" "231" "151" "111" ... > str(ZWW_Kunden["Branche"]) 'data.frame':49673 obs. of 1 variable: $