bles which makes me
wonder ...
-Original Message-
From: R-help On Behalf Of Parkhurst, David
Sent: Sunday, September 18, 2022 8:49 AM
To: CALUM POLWART
Cc: R-help@r-project.org
Subject: Re: [R] Remove line from data file
Thank you for your reply. I meant from the dataframe, but t
mean by
�value to delete�? Could that just be a row number? I was wanting to delete
something like the 18th row in the dataframe?
From: CALUM POLWART
Date: Sunday, September 18, 2022 at 7:25 AM
To: Parkhurst, David
Cc: R-help@r-project.org
Subject: Re: [R] Remove line from data file
From the
OLWART
> *Date: *Sunday, September 18, 2022 at 7:25 AM
> *To: *Parkhurst, David
> *Cc: *R-help@r-project.org
> *Subject: *Re: [R] Remove line from data file
>
> From the file? Or the data frame once its loaded?
>
>
>
> What format is the file? CSV?
>
>
>
>
>From the file? Or the data frame once its loaded?
What format is the file? CSV?
Do you know the line that needs deleted?
mydf <- read.csv("myfile.csv")
mydf2 <- mydf[-columnName == "valuetodelete", ]
# Note the - infront of column name
# or perhaps columnName != "value to delete", ]
write.csv
I’ve been retired since ‘06 and have forgotten most of R. Now I have a use for
it. I’ve created a data file and need to delete one row from it. How do I do
that?
DFP (iPad)
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https:/
5 matches
Mail list logo