[BlindRUG] BlindRUG Digest, Vol 63, Issue 1

Kennedy Stomberg stomberg8 at gmail.com
Thu Feb 10 21:05:32 UTC 2022


Hello, Amy, 
I won't speak to your variable and class questions, because it's honestly been awhile, and I don't remember how I managed those situations. :-)  

I will speak to not being able to find solutions on websites, because that's something I definitely struggled with.  

The first thing I would say is to bear in mind that if you're looking up how to do something in R, a lot of websites are assuming you know certain things, like what to do with missing data. Sometimes, it's honestly just a lot of trial and error figuring out what you might be missing with your code, or trying a couple different ways of doing the same thing.  

It may also be the case that you can't simply copy code over from a website. They usually give examples, and as you probably know, they're not measuring the same things you are, so you have to adjust your code to reflect that. (I know it seems silly, but I've definitely made this mistake!) You have to rely on your own statistical knowledge to know what you need to fix to make the website's code work with your data. 

Yet another reason code from a website may not work for you might be super obvious, but I've messed this up countless times, so here it is: Your working directory might not be set correctly. What I mean by this is that the code may not be working on your set of data, because you haven't set the directory to wherever your data is stored. If this is the case, you should know pretty quickly, because R should give you an error message saying that your data set couldn't be found.  

Finally, make sure you have the correct package installed to perform the function the website suggested. Again, if you don't have the propper packages installed, you'll know pretty quickly because you'll get an error message saying that the function cannot be performed. If you're ever unsure, you can always search online for what package you need in order to perform the function.  

I know you mentioned some frustration, because you don't always realize you have to do things like take care of missing data. I would suggest that when you find a code and you know for certain that it works, you copy it into a script within R, and save it with a descriptive name like "Code for Performing Liniar Regressions" for example. I believe that within a script you can use # (pound sign) to make a comment that won't be received as code, but can help you remember things about the code. So for example, you could have your code in the script and then a comment that says:  

# Remember to deal with missing data first. 

You could put that above the actual code, so it's the first thing you notice when you open the script. This way, you have your code, and any caveats you need to know about for that code, all in one place! Then you can just copy in different variables any time you need to run that code, and it can make your life easier! You can start to accumulate such scripts and save them all in one folder. :-) 

Finally, concerning copying everything to a text editor, I believe you can. Someone should definitely correct me if I'm wrong on this, but I would think you could go to the Edit menu and hit "Select All" You should then be able to hit Control+C for Copy. You could then go to your text editor of choice and hit Control+V for paste, and it should be there, including error messages. It could get a bit messy, because if I remember corrctly, this will copy everything in the console, including your code, your output, any error messages, and even the stuff you see at the top of the console, like the comand for getting help. Also, make sure you copy it into a text editor like Notepad, rather than a word processor like Microsoft Word. (Again, sorry for stating the obvious, I just didn't want to assume anything, since I made the same mistake once).  

I hope some of this was remotely helpful, and feel free to let me know if you need clarification!  

Sincerely,  
Kennedy  

Kennedy Stomberg, M.S. she/her/hers 
 

> On Feb 10, 2022, at 11:25 AM, Amy Albin via BlindRUG <blindrug at nfbnet.org> wrote:
> 
> Okay I've been having lots of problems with classes. Like when I turn
> a variable into numeric it will still stay a list. When trying to
> combine 4 data.frames into one, it won't let me because they have
> different numbers of rows. I don't think it should matter. Like it
> doesn't matter if not all the same number of people were in each
> condition, so why can't I combine them?
> 
> Another problem is every time I export to .csv and then reimport into
> R, it adds an extra column. Every time. So the first day I'm working
> in columns 2:13, second day it migrates to columns 3:14, third day
> it's 4:15.
> 
> Also I can't figure out how to get row standard deviations.
> 
> As far as problem solving, what I mean is that many times just
> Googling won't work. I try to apply what the code says from a website
> and it doesn't work because maybe something's different about my data.
> Like one example was that the website didn't say you had to remove
> missing data in order for it to work, so I spent like an hour not
> knowing what to do with "incorrect number of dimensions" error.
> 
> My final question is: Is there a way to log the entire R history
> including error messages into a text file? This would help me a lot
> when I'm working with others and need to tell them what went wrong.
> Again, I found a website that claimed to explain how to do it but it
> didn't work for me.
> 
> Thanks.
> 
> Best,
> 
> Amy
> Pronouns: she/her/hersOn 2/10/22, blindrug-request at nfbnet.org
> <blindrug-request at nfbnet.org> wrote:
>> Send BlindRUG mailing list submissions to
>>    blindrug at nfbnet.org
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>    http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org
>> or, via email, send a message with subject or body 'help' to
>>    blindrug-request at nfbnet.org
>> 
>> You can reach the person managing the list at
>>    blindrug-owner at nfbnet.org
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of BlindRUG digest..."
>> 
> 
> _______________________________________________
> BlindRUG mailing list
> BlindRUG at nfbnet.org
> http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org
> To unsubscribe, change your list options or get your account info for BlindRUG:
> http://nfbnet.org/mailman/options/blindrug_nfbnet.org/stomberg8%40gmail.com
> The list archive can be viewed at:
> http://www.nfbnet.org/pipermail/blindrug_nfbnet.org
> 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