Jim solution posted

Yousri

---------- Forwarded message ---------
From: Jim Lemon <drjimle...@gmail.com>
Date: Sun, Apr 26, 2020 at 6:30 AM
Subject: Re: [R] How to edit a dataframe/tibble in R console
To: Yousri Fanous <yousri.fan...@gmail.com>


Hi Yousri,
This may help:

rootstock.df<-as.data.frame(lapply(rootstock,as.vector))
edit(rootstock.df)

Jim

On Sun, Apr 26, 2020 at 5:21 PM Yousri Fanous <yousri.fan...@gmail.com>
wrote:
>
> I recently installed R 3.6.3 on my windows laptop.
>
> R version 3.6.3 (2020-02-29)
>
> I am trying to import a stata .dta file to R
>
> >url<-“http://www.stata-press.com/data/r10/rootstock.dta”
>
> >library(tidyverse)
>
> >library(haven)
>
> >rootstock<-read_dta(url)
>
>
> All works as expected.
>
>
> >class(rootstock)
> [1] "tbl_df"     "tbl"        "data.frame"
>
>
> Now I cannot use the edit command with a tibble or a data frame
>
>
> > edit(rootstock)
> Error in edit.data.frame(rootstock) :
>   can only handle vector and factor elements
>
>
> I noticed that their is an add-on package editData for Rstudio, but I
> cannot use it from the console:
>
> >library(editData)
> >editData(rootstock)
> Error: RStudio not running
>
>
> How can I edit a tibble/dataframe from the console?
>
>
> Yousri Fanous
>
> Software Developer
>
> IBM Canada
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to