RE: [R] NA erase your data trick

2005-05-17 Thread Daniel Nordlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anders Schwartz Corr Sent: Monday, May 16, 2005 10:38 PM To: r-help@stat.math.ethz.ch Subject: [R] NA erase your data trick Oops, I just erased all my data using this gizmo that I thought

Re: [R] NA erase your data trick

2005-05-17 Thread Uwe Ligges
Anders Schwartz Corr wrote: Oops, I just erased all my data using this gizmo that I thought would replace -9 with NA. A) Can I get my tcn5 back? As you got it the first time. There is nothing like undo. B) How do I do it right next time, I learned my lesson, I'll never do it again, I promise! By

Re: [R] NA erase your data trick

2005-05-17 Thread Duncan Murdoch
Anders Schwartz Corr wrote: Oops, I just erased all my data using this gizmo that I thought would replace -9 with NA. A) Can I get my tcn5 back? Not if you don't have it backed up somewhere else. I wouldn't recommend keeping your only copy of anything in an R workspace. It's too easy to

Re: [R] NA erase your data trick

2005-05-17 Thread Petr Pikal
Hi Maybe tcn5[tcn5 == -9] - NA if tcn5 is matrix mat-matrix(rnorm(100),10,10) mat[5,6:7]- -9 mat[mat == -9]-NA Read some intro on data manipulation, it helps you to avoid thinking in loops Cheers Petr On 17 May 2005 at 1:37, Anders Schwartz Corr wrote: Oops, I just erased all my

Re: [R] NA erase your data trick

2005-05-17 Thread Detlef Steuer
On Tue, 17 May 2005 08:33:00 +0200 Uwe Ligges [EMAIL PROTECTED] wrote: Anders Schwartz Corr wrote: Oops, I just erased all my data using this gizmo that I thought would replace -9 with NA. A) Can I get my tcn5 back? As you got it the first time. There is nothing like undo. If

Re: [R] NA erase your data trick

2005-05-17 Thread Prof Brian Ripley
On Tue, 17 May 2005, Uwe Ligges wrote: Anders Schwartz Corr wrote: Oops, I just erased all my data using this gizmo that I thought would replace -9 with NA. A) Can I get my tcn5 back? As you got it the first time. There is nothing like undo. B) How do I do it right next time, I learned my lesson,