Remove only one value from a table before exporting

Hi!

I have a hard time finding a solution to the following problem.

Lets say I have the following data frame:

a <- c(1,2,3)
b <- c(4,5,6)
c <- c(7,8,9)

df <- cbind(a,b,c)

     a b c
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9

But I want a "kable" output table that looks like this:

     a b c
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 

How can I remove only one value, in my example only value 9, from the table that I export?

Any help appreciated!

a <- c(1,2,3)
b <- c(4,5,6)
c <- c(7,8,9)

d <- cbind(a,b,c)
d <- apply(d,2,as.character)
d[3,3] <- ""
pander::pander(d)
a b c
1 4 7
2 5 8
3 6

Created on 2023-05-27 with reprex v2.0.2

Many thanks technocrat!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.