all I want to do is replace one single cell in R

ONE SINGLE CELL

nothing else

the internet does not know how to do this

I have tried like ten different search queires by now and I can't find an answer how to replace ONE SINGLE CELL in R

@schratze
index there can be the 1-based row number index or it can be a logical vector, so you can do handy things like

df$height[df$name == "bob"] <- 180

@datatitian hmm I tried this out with the row number as the index and it doesn't work

@schratze can you share some code? That's definitely how it works

@datatitian I was able to do it with the following code:

d["2589", "Konnektor"] <- "weil"

where d is my dataframe, 2589 is the row number, Konnektor is the column name, and weil is the new value

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.