Shadow

Blog

Nice and Quiet

Blog, Hardware, Linux, Recent Posts, Software
Sometimes a quiet day or two is just fine. No bad storms, no asteroid collision, no interesting tech news, just dull mediocrity. Yes, there's been some Linux Distro releases, and Apple product announcements, but nothing to lose any sleep over. There's no real reason to upgrade to a new laptop, no real need to update my iPhone, there's really nothing going on to get all worked up about, and that's not so bad. I can hold onto my wallet for a while, because I can't think of anything new recently announced that I really feel like I'm missing out on. That's good for me, but probably no so great for the industry. Too much excitement can sometimes cause real interesting news to get lost in a wave of noise. It's all perception. If you're actively looking and waiting for a particular hardware ...

Hold steady for now | Use an operating system you're comfortable with.

Recent Posts, Blog
Another week, another post, but not what I had planned. I’ve been spending more time working with the latest Windows 10 upgrade. Today I just shut it down and went back to MX. (Check out the post on Linux MX) There’s nothing about the new version that I really need. It’s not a bad design, and I think it’s probably the best incarnation of Windows OS I’ve ever worked with, but I don’t really need it. It won’t be my daily driver, I tried, but I seemed to spend more time navigating around than I really needed. Having Ubuntu supported was useful, but I could see how things were starting to get a bit busy in that if I’m just working with the Linux shell - why do I need Windows?It feels like carrying around a huge toolbox full of tools when I probably won’t need any of them, or when all I really...
How To Select Multiple Columns Using Grep & R

How To Select Multiple Columns Using Grep & R

Blog, Data Science, Recent Posts
Why you need to be using Grep when programming with R. There's a reason that grep is included in most if not all programming language to this day 44 years later from creation. It's useful and simple to use. Below is an example of using grep to make selecting multiple columns in R simple and easy to read. The dataset below has the following column names. names(data) # Column Names [1] "fips" "state" "county" "metro_area" [5] "population" "med_hh_income" "poverty_rate" "population_lowaccess" [9] "lowincome_lowaccess" "no_vehicle_lowaccess" "s_grocery" "s_supermarket" [13] "s_convenience" "s_specialty" "s_farmers_market" "r_fastfood" &#...

Sort

Recent Posts, Blog, Linux
The command sort is used to sort files line by line.  Lines starting with a number go first. Lines that come next in order go alphabetical with uppercase letters appearing before lowercase ones. Use cat to create "testsort" for the example. ~/Test>cat testsort A line 1 a line 2 8 line 3 line 4 5 line 5 ~/Test>sort testsort 5 line 5 8 line 3 A line 1 a line 2 line 4 R sorts by using a random hash of keys ~/Test>sort -R testsorta line 25 line 5A line 18 line 3line 4 ~/Test>sort -R testsort5 line 5A line 1a line 2line 48 line 3

Egrep & Fgrep

Recent Posts, Blog, Linux, Tech Tips
EGREP:             The Command egrep is the same as running grep –E. egrep is used to search for a pattern using extended regular expressions. Terry@f:~/FinderDing>cat testsort A line 1 a line 2 8 line 3 line 4 5 line 5 Terry@f:~/FinderDing>egrep '^[a-zA-Z]' testsort A line 1 a line 2 line 4 *Show lines that start with a letter from alphabet Terry@f:~/FinderDing>cat html <!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> Terry@f:~/FinderDing>egrep "My|first" html <h1>My First Heading</h1> <p>My first paragraph.</p> `*Find lines with pattern My first from html file FGREP: The command fgrep is the same as running grep –F. The Command searches for fixed character strings in a...