0

After importing a .csv file,

library(dplyr)
wages_DataFrame <- read.csv("~/Documents/Econometrics/PS2 data/Ch04.Ex5.HeightWagesUKData/heightwage_british_males.csv")

I want to exclude males who are shorter than 40 inches and earn more than 400 pounds, but when I run

filter(wages_DataFrame, height33 >= 40 & gwage33 <= 400)

R complains that the object height33 (one of the columns) is not found.

Julius Vainora
  • 47,421
  • 9
  • 90
  • 102
Henry Walsh
  • 135
  • 2
  • 7
  • Welcome to Stack Overflow, in order to find help here, please consider [how to write a reproducible example](https://stackoverflow.com/a/5963610/6574038), thank you. – jay.sf Feb 20 '18 at 21:39
  • Well, have you checked that `height33` is a valid column in `wages_DataFrame`? `colnames(wages_DataFrame)` will hold the answer. – Maurits Evers Feb 20 '18 at 22:32
  • Post the View or Head output – Union find Feb 21 '18 at 03:45

0 Answers0