Error: Cannot change working directory in R Studio

I had initially set it to be setwd(“Users/myname/datascience”)

make sure you have the initial / so it is this:
setwd(“/Users/charliecraine/datascience”)

another method is that under the Files Pane in the lower left of RStudio, there is a “More” button. Clicking “More” you will see an option to “Set as Working Directory.” This will set the current directory to whatever folder you have open in your Files Pane.

Once you click this, it will change the current working directory and print the code to perform this, in the console. This is to inform you of the change, as well as ensure reproducibility. Lastly, at the top of the console, you will find the current working directory displayed in that top line.

You’ll see something like this show up in your console:

setwd(“~/datascience”)

Review: Sensor Tower for app research and tracking

If you are interested in building an app or have built an app and want to track how it is doing for search, etc. Sensor Tower is a good tool.

Currently I’m tracking my game BouncyKat. The good news is I learned a lot about search, especially from their daily lessons (sign up here to get the email). The bad news is my search terms stunk.

So, after making a few key changes to my game to iTunes so that I could change my keywords and description. I’m on a trial, so if I get the ability to track more keywords in the future I’ll amend this review, so I can only track and do limited research. But the research that is available is rich and actionable.

For example, I can see the difficulty to rank, by device and where I rank for those terms. Right now I stink but I’m working on it. Not only am I working on it but the screenshot below aren’t even good search terms to track. I’ll update those once iTunes approves my update.

Screen Shot 2015-01-07 at 12.46.29 PM

Sensor Tower also allows for keyword research, suggestions and spy on keywords from other apps. The spy tool is great because you might find that there is an app that doesn’t have a ton of reviews and has been out for a while but ranks in the top 10. Why? I ask that all the time and Sensor Tower helps me diagnose with an easy to use interface.

Ignore my horrible ranking for now because Sensor Tower has allowed me to get smarter about keywords (if you need to update your keywords you can only do it once you update your app in iTunes otherwise they are locked).

Below you can see an example of keyword research dashboard:
Screen Shot 2015-01-07 at 12.50.30 PM

Below are the features you get when you use Sensor Tower:
Screen Shot 2015-01-07 at 12.52.26 PM

The one issue that I’ve run into, frankly, is the cost. I’m trying to move game app development beyond a hobby so $79 a month is a steep price to pay for tracking a hobby. If I were a professional or agency and my apps were already making money this would be a bargain. Below is the breakdown in costs.

Screen Shot 2015-01-07 at 12.56.13 PM

Solved: Retrieve public RSA key on Mac for Git

Ever created a key and either didn’t save it or forgot where it was all together? Well, if you are on a Mac, you might have it in your Keychain. I thought mine was there, but quickly found out that my Keychain password was wrong. So, what to do?

You can retrieve your SSH key via Terminal on your Mac.

Open Terminal and add the following code:

cat ~/.ssh/id_rsa.pub | pbcopy

Now, your SSH key is in your clipboard and you can paste it anywhere. I’d recommend creating a Git password in your Keychain and saving it there.

Solved: Error: could not find function “cast”

If you’ve been trying to cast in R and have run into the following error:

Error: could not find function "cast"

Then here is the solution. You must install either reshape or reshape2. I actually installed both. Here are the steps in R:

> install.packages("reshape", type="source")
> install.packages("reshape2", type="source")
> library(reshape)
> library(reshape2)

Cast should now work. Good luck!

Solved: SSL: certificate verification failed with R and twitteR

Have you been trying to use R and hook it up with something like twitteR and got an SSL error message?

Me too. But I found the problem. Here was my original code:

> cred$handshake(cainfo="cacert.pem") 

But I kept getting the following error:

Error in function (type, msg, asError = TRUE)  : 
  SSL: certificate verification failed (result: 5)

The fix was simple. Change this code:

> cred$handshake(cainfo="cacert.pem") 

To the following code (make sure you are directing the .pem location correctly. Mine is at the root of my Mac yours could be in /User/username/Documents/cacert.pem for example):

> cred$handshake(cainfo=system.file("CurlSSL", "cacert.pem", package = "RCurl"))

Then your browser window will pop open and ask for your Twitter OAuth PIN. Put that in and you are all set. Don’t forget to save your work and test for TRUE with registerTwitterOAuth line:

> save(cred, file="twitter authentication.Rdata")
> registerTwitterOAuth(cred)

Fix: sudo: port: command not found

I’m trying to setup Python 2.7 and SciPy and hit a major roadblock. I kept getting
sudo: port: command not found

On Mac OSX, I’m on Yosemite, if you’ve installed MacPorts with the package installer and have the same issues that I encountered I’ve got the fix. Part of the problem is that MacPorts binaries are installed in /opt/local/bin, so you just need to add this path to your PATH environment variable. Example with your user, add to your $HOME/.profile:

Add the following in terminal —

Step one:

export PATH=$PATH:/opt/local/bin

Step two:

$ source .profile

Step three:

sudo port -v selfupdate

Musings :)