How to have my zeros as slashed zeros?

labels = c(0, 1))

How do I get my zero's in Rstudio to be slashed zero's?

Thanks

You would change font, try Consolas

This topic was automatically closed 21 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.

Thank you for that response, and it answered my question the way I asked it.
However it hasn't fixed my issue as I thought it would...lol

I am trying to get my zero to represent 'No' and 1 to be 'Yes' but it come up in my table as n/a.....my code is below.

dataset$Purchased = factor(dataset$Purchased,
levels = c('No', 'Yes'),
labels = c(0, 1))

I think you are using labels and levels the wrong way around?

It should be zero, but look like 'No'
Or it should be 'No' but look like zero?

I would guess you would get NAs if you didn't have the No and Yes that we are assuming you have.

Yeah it is No that comes up as 0.

I'm trying to get this......

image

But I am getting NA all the way down instead of the 0 and 1. The only difference between codes was the slashed zero, hence my initial question.

The code is the same....but getting different results. I am doing an online basic course.

Awesome....thank you for your help. It occurred to me after your last comment that I was trying to implement the code with the slashed zeros against the NA's from the original mistake. So I went back to the beginning and it has now worked fine.

Thanks so much for helping. :smile: