Journaling on estrip is easy and free. sign up here

Tinypliny's Journal

tinypliny
My Podcast Link

10/26/2011 10:41 #55380

Writing Functions in R: Part 2
Category: r statistics
I skipped all the in-between bits of writing functions. Maybe I will return to them in the future.

But for now, I think it's super important to know how to apply a function once I have written it using what else but...
APPLY!!!

  • The output of Apply can be a vector or array or list of values
  • The input of Apply is always a matrix. So make sure to insert a "as.matrix" before anything you want to apply your function on.


Basic syntax:

apply(as.matrix(some object which is not a matrix already), Starting Row, function)

For eg.
Out <- apply(as.matrix(list of element), 1, function)

10/25/2011 21:57 #55378

Zim - Invading my desktop!
Category: linux
I am finding Zim (the desktop wiki-like note-taking software) SO useful for random on-the-fly notetaking!
image

Zim is like a wiki, todo checklist, notebook, LaTeX scratchpad all rolled into one! I think I like the todo checklist and LaTeX parts the best. It has this nifty dvipng plugin that generates small png images for equations. You could just take these equation pngs and stick them anywhere.

Like here.
image

Not only is it invading my desktop, it is invading the cloud. I set up cloud sync of my notebooks through SME sync to Skydrive. Now, that is one fail-proof hyperlinked universal brain dump.

Robert - 07/30/13 00:06
i love invader zim!
metalpeter - 10/26/11 17:26
Yeah all the computer stuff I read like 3 lines and give up..... I wonder if on Friday a computer will show up to the Halloween Party in an (e:tinypliny) Costume........ HA!
tinypliny - 10/26/11 14:19
Cute was not on the menu, but I will take whatever I get. ;-P

Really, you use ZIm as well?? On what platform? Android?? Is there a port for Mac?(aren't you primarily on a mac?)

OR maybe you mean Zim - you know, the real invader ZIm? :)
enknot - 10/26/11 13:59
stop being so cute. there's only so much I can stand. then my head explodes. you don't wanna be responsible for that.

I fuggin' love zim. So cutatstic. uugh.
tinypliny - 10/26/11 10:34
Sorry for being so dense and writing arcane stuff here! It's just that my life has been completely taken over by coding, statistics, "man pages" (or manuals for regular people), linux, R and pretty much everything that would help me finish this dissertation once and for all. :(

Actually, this software called Zim desktop editor could help you go paperless if you so wish. Its a crosslinked notebook software on your computer (I am sure there are clones like this in Mac) that helps you jot down (what else but) notes in a hurry. Additionally, you can make checklists and even quickly insert and format complicated formulas - that would require very tedious formatting in even big word processors like "Word" (or whatever the mac equivalent is).

Healthy is not always equivalent to tasty. hehe Some believe that happiness is the key to health so maybe you are actually WAAAAY healthier than I could ever be. You certainly look healthier :-)
lilho - 10/26/11 01:03
none of your blog ever makes sense to me except for the food entries, and then i always wish i could eat so healthy. i am a glutton.

10/25/2011 14:33 #55375

Change ANY Gnome 3 shortcut
Category: linux
I am making shortcuts left, right and centre in the Gnome 3 interface.

Turn on shortcut editing


gsettings set org.gnome.desktop.interface can-change-accels true



Hover mouse over the menu entry
Press Delete
Press new shortcut combo

Turn off shortcut editing


gsettings set org.gnome.desktop.interface can-change-accels false


10/24/2011 19:21 #55372

Writing Functions in R: Part I
Category: r statistics
I have been learning how to write functions in R. They are core to learning the language instead of just using what other people have written for their purposes. They make tailored manipulations in R easier. I am going to document the function writing system here, step by step so I can progressively write better functions and yet not forget the basics

Basic Syntax

NewFunction <- function (input){
answer <- some manipulation with the input
answer
}

  • NewFunction is the name of the new function.
  • function is the R function that creates functions.
  • input is the "argument" of a function
  • { delimits the beginning of the function
  • } delimits the end of the function
  • the last statement (in this case, just "answer", returns the answer as the output of the function. I could also have said return(answer).


10/23/2011 17:29 #55370

Alt+Tab Vs. Alt+~ in Gnome 3
Category: linux
It took me all this while to find out that one of my greatest annoyances in Gnome 3 is actually solvable by a simple change in position of my finger while typing the alt-tab combination.


Alt + Tab
Switches Applications

and

Alt + ~
Switches Windows


Reclaim the maximize and minimize buttion. Because sometimes, you just don't want to let go of the stylus (or mouse).


gconftool-2 --set /desktop/gnome/shell/windows/button_layout --type string :minimize,maximize,close



Sweet. Two more annoyances banished.

tinypliny - 10/24/11 19:27
I am liking it a lot after I installed gnome frippery. ;-)
paul - 10/23/11 19:19
I bet in the end you will end up loving it.