[BlindRUG] About BrailleR and Type Conversion

Jonathan Godfrey A.J.Godfrey at massey.ac.nz
Wed Sep 15 23:56:09 UTC 2021


Hello Amy,

The use of text files has been superseded by R markdown. The BrailleR functions were needed back when we did not have mainstream tools to deliver what we need. 

As for type conversion, I usually suggest to my students that they make a new variable if they want to keep the numeric version and a categorical version. A variable like group won't get used as a numeric variable, but I find it easer to have just one rule for them to follow.

If you use as.factor(Group) in your working without assigning it to a new variable, then it won't alter the original data as imported. It would be better to use GroupF=as.factor(Group) or similar. Even better is to do that as part of your data import:

Library(tidyverse)
MyData = read.csv("OriginalData.csv") %>% mutate(GroupF=as.factor(Group)) %>% glimpse()

You should see both Group and GroupF in the resulting data set.

As an aside, if you only have two groups, the conversion to a factor is unnecessary. I tend to do the conversion and ask how many groups there are later though.

Enjoy,
Jonathan





-----Original Message-----
From: BlindRUG <blindrug-bounces at nfbnet.org> On Behalf Of Amy Albin via BlindRUG
Sent: Thursday, 16 September 2021 11:05 AM
To: blindrug at nfbnet.org
Cc: Amy Albin <amyralbin at gmail.com>
Subject: [BlindRUG] About BrailleR and Type Conversion

Hello All,

I have 2 questions.

The first has to do with how can I get a text file with a history of
both input and output to show others my process? I know BrailleR seems
to have this capability, but I cannot seem to find a working download
link for BrailleR. Any suggestions?

Also I am having a problem with variable type conversion. I have an
imported .csv file with a variable called Group. R classifies Group as
integer, (it's 1 and 2) but since it's a binary variable, I would like
it to be factor. I tried
as.factor(Group)

But when I type

class(Group)

I am told integer. So how do I convert my variable to factor?

Thank you so much.

Best,

Amy Albin
Pronouns: she/her/hers

_______________________________________________
BlindRUG mailing list
BlindRUG at nfbnet.org
https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Flistinfo%2Fblindrug_nfbnet.org&data=04%7C01%7CA.J.Godfrey%40massey.ac.nz%7C02406bfd8d2043b1a6aa08d9789d6ac2%7C388728e1bbd0437898dcf8682e644300%7C1%7C0%7C637673439770275671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jcl9ah3n8nLFG9BRTA3JLbd0DlCI%2B3MW56B13C5HSn4%3D&reserved=0
To unsubscribe, change your list options or get your account info for BlindRUG:
https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Foptions%2Fblindrug_nfbnet.org%2Fa.j.godfrey%2540massey.ac.nz&data=04%7C01%7CA.J.Godfrey%40massey.ac.nz%7C02406bfd8d2043b1a6aa08d9789d6ac2%7C388728e1bbd0437898dcf8682e644300%7C1%7C0%7C637673439770275671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=N5uBPC1%2BEWCceHW2n%2B3Czlq2TteWNGY9%2ByektHKuwRQ%3D&reserved=0
The list archive can be viewed at:
https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.nfbnet.org%2Fpipermail%2Fblindrug_nfbnet.org&data=04%7C01%7CA.J.Godfrey%40massey.ac.nz%7C02406bfd8d2043b1a6aa08d9789d6ac2%7C388728e1bbd0437898dcf8682e644300%7C1%7C0%7C637673439770275671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eTTs9SF7WOPxEjbHwJYub6YLiSoiYVCvlrpR6bpian8%3D&reserved=0
More information and useful links about using R as a blind person can be obtained at:
http://R-Resources.massey.ac.nz

Look for help using R commands by reading the accessible e-book "Let's Use R Now" compiled by Jonathan Godfrey at:
http://R-Resources.massey.ac.nz/lurn/front.html



More information about the BlindRUG mailing list