| To: | Samer Mouksassi <smouksassi@Pharsight.com> |
|---|---|
| Subject: | Re: Subsetting a dataframe in SPlus 8 |
| From: | Madeline Bauer <mbauer@usc.edu> |
| Date: | Tue, 16 Jun 2009 19:06:20 -0700 |
| Cc: | s-news@wubios.wustl.edu |
| References: | <7rrekj$3qk0ie@msg-ironport1.usc.edu> |
|
Hi Samer, Thank you for your example. Here is my output for your example ... as you can see, the subset is correct, but at least in my SPlus 8.1.1, the final not Subset produces just a bunch of NAs. So I got the idea to try SPlus 8.1.1 in a different project! That works! (See output below.) It looks like something happened to the specific SPlus 8.1.1 project!! I will now see if I can reconstruct that project. Thanks for your help! Madeline ========= worked example =============== attach (fuel.frame) names(fuel.frame) [1] "Weight" "Disp." "Mileage" "Fuel" "Type" Subset <- I( (Weight == 2560 & Mileage == 33) | (Weight == 2345 & Mileage== 33 ) ) mode(Subset) # this gives logical [1] "logical" table (Weight [Subset], Mileage [Subset]) 33 2345 1 2560 1 as.data.frame ( fuel.frame[!Subset,]) Weight Disp. Mileage Fuel Type NA NA NA NA NA NA NA1 NA NA NA NA NA NA2 NA NA NA NA NA NA3 NA NA NA NA NA NA4 NA NA NA NA NA NA5 NA NA NA NA NA NA6 NA NA NA NA NA NA7 NA NA NA NA NA NA8 NA NA NA NA NA NA9 NA NA NA NA NA NA10 NA NA NA NA NA [snipped] NA59 NA NA NA NA NA ============ example output using a different SPlus project ============== Weight Disp. Mileage Fuel Type Ford Festiva 4 1845 81 37 2.702703 Small Honda Civic 4 2260 91 32 3.125000 Small Mazda Protege 4 2440 113 32 3.125000 Small Mercury Tracer 4 2285 97 26 3.846154 Small [snipped] Nissan Van 4 3690 146 19 5.263158 Van At 05:12 PM 06/16/2009, Samer Mouksassi wrote: Can you please provide a reproducible example? |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Subsetting a dataframe in SPlus 8, Madeline Bauer |
|---|---|
| Next by Date: | Re: Subsetting a dataframe in SPlus 8, Madeline Bauer |
| Previous by Thread: | Subsetting a dataframe in SPlus 8, Madeline Bauer |
| Next by Thread: | Re: Subsetting a dataframe in SPlus 8, Madeline Bauer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |