Re: [R] Create a vector without using an external 'if statement'

2013-04-02 Thread Adams, Jean
the if statement correctly? > > Thank you for your help > Stefano > > > > Da: Adams, Jean [jvad...@usgs.gov] > Inviato: martedì 2 aprile 2013 15.19 > A: Stefano Sofia > Cc: r-help@r-project.org > Oggetto: Re: [R] Create a vector without using an external '

Re: [R] Create a vector without using an external 'if statement'

2013-04-02 Thread Adams, Jean
Stefano, How are you reading your data into R? If you are using a function like read.table(), you may be able to inform R upon reading the data that -999 represents a missing value using an option like na.strings, for example: read.table(file, na.strings="-999") Otherwise, you can change th

[R] Create a vector without using an external 'if statement'

2013-04-02 Thread Stefano Sofia
Dear R-users, suppose I have three dataframes like these df1: mydate min_temp 31032013 12 01042013 8 02042013 -999 df2: mydate min_temp 31032013 10 01042013 11 02042013 14 df3: mydate min_temp 31032013 4 01042013 3 02042013 5 where -999 means that the temperature data is not available (at th