Post #2010: PFAs, the revenge of Freon

 

Per- or Poly-fluoro-alkyl substances (PFAs).  They’ve been in the news of late.

This post is a quick refresher on PFAs. For me.  I’m just trying to get my facts straight before seeing if a need to change anything in my life to try to avoid PFAs.

Short answer is no, but more from lack of information than for any positive reason.


Part 1:  An easily-digested chemistry lesson.

Source:  An on-line chemistry course from Western Oregon University.

Alkanes are chemicals consisting of nothing but carbon and hydrogen, where the carbon atoms are “saturated” with hydrogen.  (That is, there are no high-energy “double bonds” or “triple bonds” among the carbon atoms.)  The carbons can be arranged in a straight chain, a branched chain, or some form of circle.  You are already know the names of some common straight-chain alkanes, above.

Aside from the fact that we can burn them as fuel, most common alkanes are unremarkable.  These substances are produced routinely in nature (insert fart joke here) and will break down naturally.  For example, the half-life of methane in the atmosphere is somewhere around 10 years.

But if you can take those run-of-the-mill alkanes, and somehow substitute fluorine atoms for hydrogen atoms … magic happens.

For example, the single most-common plastic in the world — polyethylene — found in milk jugs world-wide, becomes the slickest substances in the world — Teflon.

 

The quick upshot is that whenever you substitute fluorine for hydrogen in these long-chain carbon compounds, there’s a good chance you’ll end up with something that’s pretty cool.  Something that is:

  • completely inert (Halon). or
  • works as a refrigerant (Freon), or
  • produces a nearly-frictionless surface (Teflon), or
  • makes fabric waterproof and oil-proof  (Scotchguard)

The root of all of that is this:

Source:  Chemtalk.

All these magical properties — inert, un-wettable, nearly frictionless — derive from the same source.  Fluorine is the most electro-negative element in the known universe.  That is, among all the elements, fluorine has the strongest attraction to electrons held by other atoms. 

The upshot is that if you can manage to get fluorine to bond with carbon, it stays bound.  It takes a large amount of energy to break that bond, precisely because fluorine wants to hold onto those carbon electrons more than any other element does.  Better yet, that property of being tightly bound spreads to the adjacent carbon atoms, to some degree, so that much of the entire molecule is really strongly stuck together. 

It is no small trick to create fluorocarbons in the first place.  It takes more energy to get a fluorine atom hooked onto a carbon than it takes to get any other suitable element to do that.

This is why there are almost no naturally-occurring fluorocarbons.  I just read that the count stands at 30 such, in all of nature.   And many of the naturally occurring fluorocarbons are produced by a single family of exotic tropical plants.  You are guaranteed scientific publication if you discover a new one.  Correspondingly, nothing in nature has evolved to digest or decompose or otherwise deal with fluoro-carbon compounds, which is why all the plants in that family are incredibly toxic.

Sometime, when you want to feel uncomfortable, read up up what happens if you have any significant contact with hydrofluoric acid.  That intrinsic property of free fluorine is part of the problem.

In short, once you manage to substitute fluorine for hydrogen in a carbon compound, you end up with something that doesn’t want to interact with any other chemicals.  Not water.  Not oil.  Not nothin.  The very properties that make PFAs desirable as industrial chemicals — inert, waterproof, oil-proof, slick — make them virtually indestructible in the natural environment.

In any case, given their properties, it’s not too surprising that we use a lot of them.  I see a 2021 estimate from the EPA that we produce at least 85,000 tons of PFAs in the U.S. annually (Source:  EPA-821-R-21-004, Page 5-3).  If I did the math right, that’s (85,000 x 2000/330,000,000 =) at least a half-pound per person per year, in the U.S.  And I’m pretty sure that was a partial inventory.

 


2: PFAs: The best of Freon and DDT.

Source:  Socratic.org

“If those chemicals don’t break down under ordinary conditions”, you might reasonably ask, “then where do they end up?”

Seems like modern industrial society has asked that question a number of times now.  And, somehow, the answer is never good.

Start with Freon.  Any flavor of Freon.  If Freon is inert, where does it end up?  The answer for Freon is that it only diffuses into the air, until, some decades after it was released at ground level, it gets broken up by high-energy UV-C radiation in the upper atmosphere.  There, the fragments of that former Freon turn out to be quite good at thinning out the earth’s protective ozone layer.

The twist for PFAs is that they start with the same near-indestructibility of Freon, and tack on the food-chain-accumulation properties of DDT. And in this case, we’re squarely at the top of that food chain.  In addition, PFAs are eliminated from the body quite slowly — I see casual estimates of two to ten years.  Given all that, it’s no surprise to find that 97% of Americans have detectable levels of PFAs in their blood, based on the National Health and Nutrition Examination Survey circa 2007.

Having high levels of this stuff in your blood — say from occupational exposure, or consuming something heavily contaminated — is undoubtedly bad.   I’m not so clear on what the expected health effects would be at typical population exposures.


Part 3:  Action items?

To cut to the chase, no, not really.

You can find advice in this area, but it all appears to be, of necessity, total guesswork.  The fundamental problem is that there is no good assessment of where typical population exposure comes from.  Not that I could find, anyway.  Which means that you have no way to know what’s actually worth avoiding, and what’s somebody’s list of things that might contain PFAs.

For some of these, though, it’s clear that when the Feds started getting them out of consumer products, the average concentration in the blood of Americans began to fall.  Like so, from the CDC, showing U.S. population blood levels of PFOS (perfluorooctane sulfonate, top line) after the EPA orchestrated a phase-out of use of that chemical in the US.

Source:  US CDC

On the typical list of things to avoid, you’ll see Teflon frying pans and stain-proof/waterproof fabrics. I’m not sure about the extent to which the PFAs in those types of products actually end up in your blood.

But there’s a surprising amount of common skin-contact and food-contact material that may have more mobile sources of PFAs in it.

Waterproof cosmetics and sunblocks are on everybody’s list.  Although I sure can’t find any that plainly contain -fluro- chemicals listed.  I just checked a couple of bottles here, and many examples on Amazon, and I see nothing that I would recognize as a PFA.  Plausibly, if those contain PFAs, they are inactive ingredients, and so typically aren’t listed?

But also grease-resistant food packaging, including pizza boxes, french-fry bags, hamburger wrappers, paper plates, microwave popcorn bags, and so on.  Basically, a whole lot of stuff associated with take-out food.  All because a lot of grease-proof paper/cardboard coatings contain PFAs. This Consumer Reports article was illuminating, and names names among fast-food restaurants.

Some cooking parchment paper has PFAs to make it extra slick.  Some cleaners and waxes have PFAs.

But aside from “don’t eat fast food”, none of that seems terribly actionable.

For drinking water, of course this stuff is in drinking water.  At least here, where around 10% of what’s flowing past the water intakes here in the Potomac River at Washington, DC came out of some sewage-treatment plant somewhere upstream.

It appears that either activated-charcoal or reverse-osmosis filters will remove PFAs.  (That makes sense, because both of those technologies are good at removing large organic molecules.)  No pitcher-type water filters remove PFAs.  Oddly, I read that distilling water doesn’t remove PFAs either, though I have no idea why not.

4:  Conclusion

My interest on PFAs was piqued by NY Times reporting that sewage sludge used as fertilizer passes PFAs from the sewage stream onto the land, to the plants grown on the land, to (in this case) the cows that eat those plants, and ultimately to people.

This is not news, really.  There have been several EPA actions on PFAs, including cajoling industry into phasing out what appeared to be the worst PFAs. Even a cursory look shows a long history of EPA interest in monitoring these chemicals.

What caught my eye is the case of a farmer whose land was condemned for food production, due to toxic levels of PFAs in the soil, toxic enough to sicken the cattle grazing on that land.  This, where the only plausible source for those PFAs is sewage sludge that has been spread on that soil.  And since PFAs don’t break down, for all intents and purposes, the land is forever condemned for food production.

That’s unusual.  Or, at least, you rarely hear of that out side of EPA Superfund sites.

But in terms of action items, for avoiding eating and drinking PFAs, I’m not seeing a lot of quantitative advice on what to do.

So, in the absence of any better information, I’m just going to put this one on my list of all the things I dislike about the modern world, but that I can’t do anything about.

Post #2005: 55 pounds and still a loser. Maybe boring is good.

 

Introductory alcoholic ramble

This is the lowest of common denominators, a blog post about my experiences dieting.

I guess these days, with easy access to effective diet drugs, this is useless information.  But, FWIW this is all old-school.  Eat less.  Exercise more.

Some things that might make this post worth reading are that:

  • I’ve lost a bit over 55 pounds so far, from a starting point of 285, eleven months ago.  Little over a pound a week, at a steady pace.
  • My wife is, completely independently, also losing copious amounts of weight, and has decided that she likes bicycling as a form of vigorous exercise.
    • I’ve said “check for pods” enough times now that it is no longer even remotely funny.  (That is, this behavior is unlike the woman I thought I knew.)
    • We have been acting independently on the diet front.  Each to his or her own.  But doing something at the same time makes things a lot easier, for both of us.
  • In addition, things get a little weird with that much weight loss.  Particularly when you’re old (I’m a 65-year-old man.)  Stretch marks ain’t the half of it.  OTOH, I can now look down and see something other than my gut.
  • And yet, I’m still obese, so I should keep doing this.  Pretty much permanently.  And even if I hit some ultimate target weight, that just buys me a few hundred extra calories a day (from the lack of a need to lose additional weight.)
  • Surprisingly, that is not a bitter pill to swallow.  That’s new.  I had accepted this outcome intellectually long ago, but I feel that I have now accepted it into my heart.  So to speak.
  • And that’s all bound up with other lifestyle changes.
    • T-totaling after a lifetime of heavy drinking.
    • But also correcting some other bad eating habits.

I’ve had a remarkably easy time of it.  It’s like something in my head broke last September, and in a (mostly) good way.  Cravings of all kinds died.  To the point, my sense of hunger has died down.  On a good day, I’ll reach a point in the day where I feel that I should eat, but I will only have the mildest of sensations of hunger.

If that’s how you experience hunger, dieting is a snap.  I just never had that happen before.

I am hardly the first to have noted that this can happen.  I recall renowned magician Penn Jillette (like the razor, but with a J) talking about the potato diet, specifically, how he lost certain types of food cravings.

But, in my case, near as I can tell, loss of cravings was a gift.  I didn’t do anything to earn it.  Maybe I’ve done a bit not to screw it up, for example, avoiding high-starch high-calorie meals. But where this came from in the first place, I have not a clue.

Best I can say, I seem to have gone through a change-of-life experience, almost a year ago.  I don’t want to say I “hit rock bottom”, because that borrows from the gravity of those whose lives were destroyed by alcoholism, who then went on to sobriety.  But I think I may have had its kinder-gentler cousin, simple straight-up and reasonably immanent fear of an early grave. That seems to have done the trick for me.  YMMV.

I should probably write up some notes on the transition from being a heavy drinker to sobriety.

But, as with the rest of my life, it’s boring and logical.  No DTs for me.

Alcohol is a sedative.  Remove the sedative, and you catch some wicked insomnia on the rebound.  The story being that, when subject to chronic sedation, your brain fights back by growing more “stay awake” nerve centers.  The insomnia then ebbs slowly, because it requires your brain to un-wire all that.  I only had a night or two of straight-up total insomnia, followed by months of disturbed sleep.  I am now at the stage where I merely wake up to pee, which, for a guy my age, is unremarkable.

But a lingering effect is that I’m up for the day at a comically early hour.  Like 4 AM.  Not much I can do about that, and that might just be normal aging.

Did I mention that alcohol is a poison?  Remove the daily dose of poison, and if you’re lucky, and haven’t pushed it too far, your innards will eventually heal.  Mostly.  As with the disturbed sleep, it kind of asymptotes its way to a new normal over many more months that you would have thought plausible.

As for all the rest of the promises of lifestyle change — your energy will be up, and you’ll always look on the bright side of life — well, that hasn’t happened to me.  I’m not holding out hope that it will.

Source:  Tom Paxton, “Hand my down my jogging shoes today”.

It’s easier to get around, because I’m lighter.  That’s about it.  Occasionally I’ll do something and realize that, pre-weight-loss, that was a chore, and now it’s not.  That’s a kick.

Where was I? 

Ah, diet.

Just to prove this post isn’t like any other dieting post you’ve ever read, I’m starting off with some math.


I have to eat how much protein a day?

I’m used to eating a certain mix of foods.  Nothing extreme.  Not meat-heavy, but not vegetarian either.  Boring, middle-of-the-road eating.  If you’re old enough, you’ll recall being taught to eat “a balanced diet”.  That’s kinda the idea.

Vegetables, meats, grains, fruits, roots, shoots — it’s all good.  That results in a “usual mix” of protein, starch, and fat in my diet, and it suits me fine.

A balanced diet — in terms of the fraction of calories from protein, carbs, and fat — gets screwed up when you restrict calories.  That’s because, at a given weight, you simultaneously cut back your calories, and increase the amount of protein you should consume (if you lift weights regularly to try to minimize loss of muscle mass in dieting.)

As a matter of math, I end up with an unpleasantly large share of calories coming from the proteins in my diet. 

Example of 100 grams of protein a day

For the sake of argument, assume that I should ideally eat 100 grams of protein a day.  Recommendations vary a lot, even from seemingly reliable sources.  But that’s ballpark for a guy my size and age, trying to maintain muscle mass with regular weightlifting.

What’s the big deal?  That 100 grams is roughly four ounces.

Four ounces of pure protein.

My first mistake was in thinking that raw meat was mostly protein.  Actually, raw meat is mostly water.

Below, if I obtain that 100 grams of protein a day from lean ground beef, with the fat broiled out of it, I need to eat 1.25 pounds of lean ground beef a day.  Five quarter-pounders a day, of beef patties.  Like so, via the USDA.

Obviously, I can get that protein from other sources.  I could, alternatively, eat 16 hard-boiled eggs a day.

Or beans.  I’ve been told since childhood that they are good for the heart.  I could eat just shy of a half-gallon of cooked navy beans a day.

The problem is, I’d like to keep total dietary calories somewhere around 1700 per day.  That results in diet in which most of what I eat — the majority of my food calories — is in the mandatory load of high-protein foods. 

Heck, look at the bean line.  If my only protein source is beans, it’s an overdetermined system of equations.  I can’t satisfy both the calorie maximum and the protein minimum, because the protein in beans comes with a lot of starch attached.  If I ate nothing but boiled beans for protein, I’d exceed my current daily calorie target.

The result is that meat-fish-eggs comprises a much larger fraction of my dietary calories, compared to what I was used to all my life.  Not because I’m trying to eat paleo or go into ketosis.  Just because I’m trying to meet (what I think is) a reasonable daily protein target, under a calorie cap well below calories required to maintain weight.

Like the USDA food pyramid, on its head.

Too-many-proteins sounds OK, until you’ve had to eat that way for a few months.  Everything about the diet just says “way too much meat”.   As a fraction of the diet.

A solution to this overdetermined system of equations.

There are a handful of all-protein or nearly-all-protein foods that you can use.  Nonfat dairy products are high on the list.  And they’re OK.  But most of them (e.g., yoghurt) are mostly water.

But there are at least two types of all-protein isolates readily available that give you pure dry protein, extracted from some source.  One of which is whey protein isolate, from milk (I think), and favored by body-builders.  Shown above.  (Another common one is textured vegetable protein (TVP), from soy, favored by the cheap, and survivalists.  There are, of course, others, for example, plant-based protein powders.)

Today I broke down and took a trip to my local Vitamin Shoppe.  The place is weirdly well-stocked, despite the near-total absence of customers any time I’ve been there.  I picked up a big jug of whey protein isolate.  This gives me 25 grams of protein — more than in a quarter-pound (raw) broiled hamburger patty, for 100 calories, and essentially zero fat or cholesterol.

(It’s also modestly cheaper than lean hamburger as a source of protein.  That $80 jug above contains as much protein as 16 pounds of 93% lean ground beef.)

You’re well-advised to disguise it as best you can before you eat it.   Accordingly, almost all of this stuff is sold sweetened and flavored, to make a stand-alone protein drink.  My take on it is that it’s such a cutthroat market, the flavorings are sub-par.

So I bought the plain stuff, and I’m dumping it in my morning coffee, with some cocoa powder.  It’s … edible … that way.  And it gives me one-quarter of my daily minimum of protein.

I feel as if I’ve just re-invented Carnation Instant Breakfast (now renamed Breakfast Essentials), but my wife informs me that putting protein powder in your morning coffee was a hot new wellness trend in 2020, courtesy of Google Search.  So I’m just four years late to this hip new version of Instant Breakfast.

At any rate, this slug of fat-free protein should, in turn, should free up some calories that I can use to eat something other than meat and eggs. It’s a way to dodge an otherwise overdetermined system of dietary equations.

I’ll save the rest of my observations on weight loss, such as they are, for another post.

Post #1984: “All successful revolutions are the kicking in of a rotten door.”

 

Source:  Economist John Kenneth Galbraith (2001). “The Essential Galbraith”, p.186, Houghton Mifflin Harcourt

To me, this quote sums up what’s happening with the November 2024 elections, and the takeover of American politics by the frankly pro-dictatorship anti-democratic MAGA forces. Continue reading Post #1984: “All successful revolutions are the kicking in of a rotten door.”

Post #1970: Learning R as a veteran SAS programmer.

 

Above, that’s a plot of the day of the year on which Fall first frost occurred, at Dulles Airport, VA, for the years between 1965 and 2022 (ish).

In theory, that’s the same data as this plot, that I did some time ago:

The interesting thing is that I ran the first plot above using the computer language R.  The second plot came from analysis of the same NOAA data, using SAS (then dumped out to Excel for plotting).

Two days ago, I knew nothing about R.  But as it turns out, once you learn the quirks of the language, R is pretty understandable for an old-school SAS programmer.  Just a few (maybe four) hours, spread over two days, and I’m up and running in R.

The proximate benefit is that I can cancel my $3400 annual license for SAS.  Or, more to the point, I can cancel that without feeling that I have totally abandoned all ability to do statistical analyses, beyond what can be done in Excel.  And cut myself off from my entire prior life as a health care data analyst.


Baseball is 90 per cent mental. The other half is physical.

The quote is from Yogi Berra.

At some level, all computer languages designed for data manipulation and statistical analysis do the exact same thing.  You sort a file, you select observations out of the file, you do some math on those observations, and you summarize your result in some way.

The logical flow of the R program that I used to create the first graph above is identical to that of the SAS program I had run to create the second graph.

  • Take the daily temperature data file from NOAA
  • Restrict it to freezing days in the Fall.
  • Find the first such freezing day in each year.
  • Then tabulate or plot those first Fall frost dates, in some fashion

It’s just a question of figuring out the basics of the language.   In my case, there were a few stumbling blocks.

Initial stumbling blocks

First, my computer’s out-of-date.  I use Windows 7 on a Toshiba laptop.  Microsoft no longer supports Windows 7.  Toshiba no longer sells laptops.  But I don’t want to change, because the existing setup runs well, particularly for number-crunching.

In order to run R on my computer, I had to do some minor updating of Windows, as directed by the instructions for installing R under Windows, as found on CRAN.  That went smoothly, after installing the Universal C runtime update from Microsoft.

To be clear, I avoid mucking about with the Windows operating system, if possible.  I’ve had too many bad experiences in the past, where updating Windows had undesirable consequences.  But this one — and the one below — were installed without apparent incident.

The next problem is that, natively, the R distribution puts you in the “console” when you run it, which is a combination command-line interpreter/line editor/output  file.  There’s really nothing you can do in the R console except test the syntax of a single line of code.

You type a line of code.  You hit return.  It executes.  But that’s it.  Up-arrow to recall earlier lines of code.  Results from what you executed get dumped right into the window where you type your line of code.

You can’t write what I would call “a program”, in the console.  Turns out, you need another piece of software to enable you write R programs.  So R is the language, but you need something in addition to R itself, to write programs/scripts that run in in R.

To write a program (script) in R, you need a script editor.  Of which the common choice is Rstudio, which is an IDE — an integrated development environment.  Rstudio gives you a window in which to write programs (the Script Editor), in addition to that original R console window. It then interfaces with your installation of R, and runs your script (program) when you tell it to.

For SAS programmers, its the logical equivalent of … whatever the screenshot below would be called:

The thing in which I write and run programs.  I think of it as “SAS”, but it’s not, It’s just the (inter-)face of SAS, to me.  It’s software integrated with SAS (the statistical language) that allows me to write and run SAS programs.

So it is with Rstudio.  Far as I can tell, having this or some close substitute is not optional, practically speaking.  Maybe something like this actually comes with the native R distribution, but if so, it did not pop up and present itself to me.

The most recent versions of Rstudio will not run on Windows 7, but if you keep asking Google, you’ll eventually stumble across a page that has older versions of Rstudio that will run under Windows 7.  I use Version 1.0.153 – © 2009-2017 RStudio, Inc, found on this page.  Why I arrived at that version, I am no longer entirely sure.  Even with that, the instructions pointed me to an October 2019 Windows security update that I had to install (and reboot) before Windows would accept the Rstudio package to be installed.

Once you have R and Rstudio installed on your machine, you can actually write a multi-line program in R, run it, debug it, and save it.

My first R program

To learn something, I think it’s helpful to have a task you actually want to do.  In this case, I have an old analysis of first frost dates, that I had run in SAS.  That’s exactly the sort of thing I’d like to be able to run in R.  So let me replicate that.

A few points of interest for SAS programmers:

  • Comments start with #.
  • There is no explicit line terminator character, but you can separate multiple commands on the same line using a semicolon.  The stray semicolons below are just force-of-habit from writing SAS for so long.  They don’t affect the functioning of the R program.
  • But unlike SAS, if you don’t punctuate your comments, it makes them hard to read.  You can’t tell where a sentence ends.  On the plus side, I think “single-quote-in-Macro-comment” paranoia is something I can leave behind with SAS.  So my long-standing habit of omitting apostrophes from comments should be obsolete.

So, here’s an R program to read in NOAA weather data, as stored on my hard drive, and plot the Fall first-frost dates.  (Note that line-wraps got shortened when copied to the format below, causing some lines below to wrap, when they would not have in the R script itself.)

# This is an R program, termed an R script.
# It is being composed in the R script editor in Rstudio
# Near as I can tell, the R distribution itself only provides a command 
# line interpreter, e.g., a line editor.
# You need a script editor to be able to write a program aka script.


# Input data set is from NOAA, I think.
# It has daily temperature data from Dulles Airport going back to part-year 1963-ish


x <- read.csv("C://Direct Research Core//GARDEN//First frost date trend//3139732.csv", header = TRUE, sep=",")
str(x)

# The code above creates the data frame x (think, SAS file or SAS temporary file X, from the raw .csv input file ;
# Because the .csv has the column names (variable names) on the first row,
# this imports the data, using those names, via the header clause ;


# note the awkward reference to the file as stored under Windows on my computer
# every "\" in the actual file path/name needs to be overwritten with "//".
# A minor annoyance.

# Also note that R IS CASE SENSITIVE, so if a variable name was given as all caps,  
# that is how you must refer to that variable in the code ;

# Next, a crude PROC CONTENTS ; 
# This outputs a list of variables and their attributes to the console ;

str(x)

# Below, date (read in as character data) is converted to a numeric date value  which I call ndate. 
# That is the equivalent of converting a character string holding a date, to a numeric SAS date ; 
# Like a SAS date, this then lets you do arithmetic on the date ;

x$ndate <- as.Date(x$DATE)
x$month <- months(x$ndate)

# The funny nomenclature here, X$ndate and x$month is to indicate that I want ;
# to create these as new columns in my data frame, as opposed to ... I'm not ;
# quite sure what, but if I just named it ndate, I think it would be a vector in 
# the active work session, in no way connected with the data set (data frame) x

# So this isnt like the SAS DATA AAA; SET BBB nomenclature. There, if you
# create a variable in normal (non-macro) SAS code, that variable is in 
# the data set you are creating.  You cant do calculations "outside of"
# the dataset that you're working on.

# But in R, the default is to create a variable in your temporary 
# workspace.  So if you want the variable to be in the new data set
# you have to tell R that by prefixing with the dataset (data frame) name.

# Next, where SAS or EXcel typically provides a broad array of native functions ; 
# R is old-school and, even for fairly basic stuff, requires you to read in those ; 
# functions. In this case, after looking at on-line examples, I want to use 
# the "aggregate" function in library libridate. I believe that lubridate was 
# either included with my R distribution, or somehow R seamlessly finds it on the
# internet and downloads it

# Or something;

# Ok, quick test of the data, show average low temp by month, entire dataset ; 


library(lubridate)
bymonth <- aggregate(x$TMIN~month(ndate),data=x,FUN=mean)
print(bymonth)

# The above is like running ;
# PROC SUMMARY DATA = X ; 
# CLASS MONTH ; * BUT CALCULATED ON THE FLY AS MONTH(NDATE) ; 
# OUTPUT OUT = BYMONTH MEAN = /AUTONAME ; 
# RUN ; 
# PROC PRINT DATA = BYMONTH; 
# RUN ;

# and sure enough, I get mean low temp by month ; 
# NOTE THAT UPPER and lower MATTERS HERE, unlike SAS ; 
# So NAME is not the same as name or Name ;

# I AM NOT ENTIRELY SURE WHAT THE TABLE THING DOES. THE RESULTS ARE NOWHERE ;
# NEAR AS USEFUL AS A PROC FREQ OUTPUT IN SAS. THE DEFAUL HERE SEEMS TO BE ; 
# TO GIVE YOU A LIST OF ALLTHE VALUES IN THE DATASET.


w = table(x$NAME)
print(w)
W = table(x$TMIN)
print(W)

# NOW CREATE NEW DATASETS FOR ANALYSIS, 
# TAKE ONLY THE DAYS AT FREEZING OR BELOW ;
# THEN SORT BY DATE ;


x2 <- subset(x, TMIN <= 32)
x3 <- x2[order(x2$ndate),]

# BUT THIS STILL HAS E.G., JANUARY FREEZING DAYS IN IT ; 
# AS SHOWN BY CALCULATING AND TABULATING THE MONTHS PRESENT ; 
# TEST BELOW WOULD HAVE VALUE 1 FOR JANUARY AND SO ON ;

test = month(x3$ndate) ;
W = table(test)
print(W)

# month is numeric ; 
# NOW RESTRICT TO MONTHS BETWEEN JULY AND DECEMBER ;

x4 <- subset(x3, month(ndate) > 6) 
x5 <- subset(x4, month(ndate) < 13)


# Im sure theres a way to do that in one step but I do not know it yet ;
# NOW FIND THE FIRST FROST DATE EACH YEAR AS THE MINIMUM OF THE DATES ; 
# REMAINING IN THE FILE, AT THIS POINT ;


frost <- aggregate(x5$ndate~year(ndate),data=x5,FUN=min)
print(frost)
str(frost)
print(frost$`x5$ndate`)

# IF YOU THOUGHT THE NAMING CONVENTIONS WERE AWKWARD, ON THE AGGREGATE STEP ; 
# THE DEFAULT VARIABLE NAME, OF THE THING THAT HOLDS THE VALUE YOU JUST ; 
# AGGREGATED, IS FILE$VARNAME. BUT TO REFER TO IT, YOU HAVE TO SURROUND THE 
# VARNAME OF THAT TYPE WITH LITERALS ;

# BELOW, CREATE A "NORMALLY NAMED" VARIABLE IN THE FROST DATASET ; 
# THEN CHUCK OUT EVERYTHING BEFORE 1964 AS REPRESENTING INCOMPLETE YEARS OF DATA ;

frost$ndate = frost$`x5$ndate` 
frost <- subset(frost, year(ndate) > 1964)

# CREATE THE JULIAN DAY, THAT IS 1 TO 365 ;
frost$julian_day <- yday(frost$ndate)

print(frost$julian_day)

median(frost$julian_day)

# The latter computes and prints the median to the console ;

# answer is 290 ; 
# Thats October 19, more or less correct

plot(year(frost$ndate),frost$julian_day)

# FINALLY, TO RUN THIS SCRIPT/PROGRAM, HIGHLIGHT IT, THEN HIT "RUN" AT THE TOP OF THE 
# SCRIPT EDITOR WINDOW ;

An initial judgment

There are a lot of things about R that I find awkward, compared to SAS.  But so far, there are no stoppers.  What was PROC SORT in SAS is now an order command in R.  A SAS PROC SUMMARY statement becomes an aggregate command in R.  And so on.

I’m sure I’m going to miss SAS’s automatic treatment of missing values.  I’ll probably miss the SAS system of value labels at some point.

But just for messing about with data, R seems to do well enough for my purposes.

After holding (and paying for) my own SAS license for close to 30 years now, I’m finally giving that up.

I had been dreading learning a SAS replacement.  I figured I would be floundering around for weeks.  But R is intuitive enough, for a long-time SAS user, that it really doesn’t seem like it’s going to be any problem at all to pick up R as a language for data analysis.

Post #1967: Friday/Saturday this-n-that. Part 3: Vegetative propagation via air layering.

 

The set-up:  Yardwork postponed is yardwork delayed.

I would have gone done a bunch of gardening tasks yesterday morning, were it not for the fact that there was a bunch of guys building a fence in my back yard.

I didn’t invite them.  The house across my back fence was torn down a couple of months back.  That old house has been replaced by a new, much bigger, house.  The builders of that new, much bigger, house are now tearing down the rotting fence between our yards, and replacing it.

It’s their fence.  It was falling down.  No one will mourn the loss.

But while that work crew is there, I’m not comfortable going out and engaging in a leisure-time activity like gardening.

I have dug a foot in his boots.  Or something.

That said, I can see that to make the post holes, they have a guy with a post-hole digger.  A manual post-hole digger, as pictured above.

Unsurprisingly — to me, anyway — he’s having a hard time of it.  The look on his face is about the same as the look on mine, when I try to dig holes in that area, using a post-hole digger.  It’s a cross between “you’re kidding me, right” and “I have to hack my way through this with a post-hole digger”?

The dirt in that area is packed with roots of every size and description, from 60-year-old-maples to the neighbor’s bamboo.  No single tool will do the complete job of making a hole in that.  (OK,a utility company truck with a power augur would likely have no trouble.  But not much short of that.)  I resort to (and dull the edges of) an entire array of tools when I dig there, starting with an axe.

In short, digging a nice neat hole in that location is going to be a total pain.

I do not envy the man his job.  I share his pain.

But he powered on through it, I guess, as the fence is now up.


Vegetative propagation.

Now that fence is in, I need to plant something that will plausibly block my view of the new, much bigger, house.

I ideally want to plant something that doesn’t require a big hole.   Not in that location.  And yet isn’t tiny, implying years before it grows adequately to fill the space.

And if the builder plants his side in the meantime, I need to leave an open gap there for sunlight. So I may want to plant nothing.  At the least, this argues against buying a big expensive plant for this location.

In any case, I decided to use this odd need — it boils down to wanting a big plant in a small container — as an excuse to try out vegetative propagation to grow some new plants.

Old-school, this would have been stated as “I’m taking some cuttings”.  But to me, that doesn’t sound quite macho enough.  So vegetative propagation it is.

I’m trying to grow new skip laurels (and some new fig trees) from cuttings.  And I’m trying two methods of vegetative propagation:  Air layering some branches, and (what I think of as) snip, dip-and-stick on some twigs.  I vaguely believe the first is a form of brown-wood propagation, the latter is a form of green-wood propagation.  But I am unsure.  I’ve never done any of this before, and I have no clue about much of anything yet.  Let alone the accepted nomenclature.

Air layering.

With air layering, you intentionally girdle a small branch, hoping to force it to grow roots where you girdled it.  You cleanly remove a tube of bark about 1″ long, circling the branch.  Scrape the inch of branch to bare wood, optionally dust the wound with Rootone (or equivalent rooting hormone), pack a wad of wet potting soil around the wound.  Tightly wrap that wad in a layer of plastic.  Finish with a layer of aluminum foil.  The plastic is there to retain water.  The tin foil, to exclude light.

Note that, implied in all this is the idea of a branch with bark you can easily remove.  Likely second-year (possibly later) wood, with brown bark.  Likely not first-year green-barked shoots.  Thus, as practiced, an example of brown-wood vegetative reproduction.

Why not do this to a big tree limb, and produce yourself a brand-new big tree in one year?   I’m not sure.  I’m guessing the practical upper limit is set by the imbalance between leaf area and roots.  So I’d guess there’s a practical upper limit to how big a branch would survive this to become a new plant.  I’d say the norm is to do this on two-year-old wood.

Edit:  Upon reflection, that’s probably not the right reason.  Seems like leaf area and water transmission area should be in balance on the growing plant, no matter what age or diameter the branch is.  Each branch or stem would itself be balanced in this regard.  Maybe the limitation on survival is elsewhere, such as the point in time where the branch must survive on its own (new) roots.

In any case, then you wait.  Check your wad o’ dirt weekly.  Add water as required.

In a month, you’ll have a ball of roots running through that potting soil.  So they  say.

If all goes well, you then cut the air-layered branch just below the root ball, and hey presto, the branch is now a sapling.  Pot it up with TLC for one year, put it in the ground the next.   

Snip, dip, and stick.

With snip-dip-stick, you snip off a green branch end, dip the cut end in an inch or so of Rootone (-equivalent) powdered rooting agent, then stick that into a few inches of wet potting soil, in a flower pot.  Keep the pot well watered and out of direct sunlight.  Reduce to just a leaf or two per snip, so that they don’t dry out.

The theory is that (some of) these snips will grow roots in a month, at which time they can be pulled from the communal flower pot and potted up individually.  My dozen or so snips are sharing a north-facing, well-watered, never-in-the-sun flower pot.  Easy enough to water one pot.

As with the air-layered plant, they should remain potted up for a year, with TLC, and then should be ready to put in the ground next year.

In the end, these are two different ways to create something to plant next year.   I have no clue whether either method will work for me.  I’ll know more in a couple of weeks.

Addendum:  Why doesn’t air-layering kill the branch?

Here’s the part that could not believe: Girdling does not kill the branch.  The air-layered branches — stripped of their living bark for an inch — appear fine.  On both sides of the complete break in the bark.

Really?  I always heard that doing this to the trunk of a tree would kill it. And, it will.  But I figured that, by analogy, if you did that to a branch of a tree, the branch would necessarily die.

That turns out to be an incorrect analogy.  The leaves on the girdled, air-layered branches in my back yard remain green. All the way out to the end of the branch.  This is presumably from water transported to the leaves via the pith (inside) of the stem. 

Which, in my ignorance, I didn’t realize was a thing.  I thought all transport was via the cambium, the growth layer just under the bark.  But that’s wrong.  At the branch tips, water and nutrients flow from roots to leaves via the branch central pith, and finished products of photosynthesis (starches, sugars, and so on) flow from leaves to roots via the surface cambium layer.

Again, so they say.  I skipped biology in school.  Seems true, as those air-layered branches appear undisturbed by this approach.

The key point is that the branch won’t die for lack of water, even as you are preparing it for full independence from the mother plant.  That’s because you leave the water-distribution vasculature of the branch — the stem pith — intact.  Meanwhile, it takes the energy of photosynthesis, nutrients from the tree roots, and uses that to produce new roots, at the break in the outer bark.

At least, that’s the theory.  I’m reserving judgment, but this seems like an obviously better approach than snip-dip-stick.  I should know, for these plants, in a couple of weeks.

Post #1966: Friday/Saturday this-n-that. Part 2: The soothing sound of … water hammer?

 

This is a brief anecdote on how yesterday’s laundry morphed into today’s tense, once-a-decade plumbing maintenance task, replacing the water-hammer arresters installed with my clothes washer.


Listen to the rhythm of the gentle bossa nova

It all started out innocently enough.

In the prior post, I admitted to being a bit slow, at the moment, owing to my under-consumption of stimulants.  So, as I was not getting much done yesterday.  I decided to do some laundry.  That takes up some time and accomplishes something, without being mentally or physically taxing.

For maybe the first half-hour, I enjoyed the far-off sound of the laundry equipment chugging and ticking away.  Somehow I feel as if I personally was getting something done, even though the equipment was doing the work.

The catchy, staccato rhythms of the washing machine are so homey and soothing.  Put you feet up, cruise the internet, relax.  I can’t really start another task because, hey, I’ll have to go tend to the laundry soon.  Guilt-free-chill time.

… (Time passes)

It only took me a half an hour to realize that those washing-machine noises were a lot louder than I remembered.  And maybe just a bit too rhythmic.

It finally dawns on me that I’m listening to pipe knock from water hammer created by the clothes washer The rhythmic sound I’m hearing is the result of the cold water valve cycling on and off during the rinse cycle, followed by the cold-water pipes boinging back-and-forth, wherever.

Water hammer is an unambiguously bad thing.  A moving column of water (in a pipe, say), has kinetic energy.  By law, that energy must go somewhere when the column stops.  In a house, it goes into moving the pipes.  The more abrupt the stop — such as the closing of a solenoid-driven valve in a washer — the more abrupt the transfer of energy, and the bigger the “hammer” effect (all other things equal).  The moving pipes bang into stuff, which is not good in the long run.  And it induces wear-and-tear on the washing machine valves.

Water hammer, in home plumbing, unchecked, will eventually break something.  If not your water pipe, then your washing machine.  That’s what they say, and I believe them.  In effect, I’ve been enjoying the pleasant sound of my washing machine beating my water pipes (and itself) to death.  Eventually.

Too bad the builder didn’t do a better job with the pipes.  I really hate having to pay for other people’s mistakes.

… (Time passes)

Another half-hour, and I realize the water hammer is my fault and needs to be fixed.  Plausibly, I’m hearing this now because my water-hammer arresters have finally worn out.  Those are more-or-less little shock absorbers for your pipes, and used a captive bit of air and a piston to soak up the force of the water hammer before it bangs your pipes around.   Those water hammer arresters have been in place since I had this washer installed about 15 years ago.  They are long overdue for replacement.

I need two of these gizmos.  One for the hot water hose, one for the cold water hose, feeding the clothes washer.

 

Source:  Home Depot, cited just above.

… (Time passes)

And it only takes another hour for me to figure out that I should replace the washing machine hoses as well.  Installed with the water hammer arresters, they are now pushing 15 years old, or about three times their rated safe lifetime.  Unlike your garden hose, say, these hoses are under house water pressure constantly.  You really don’t want one of those to burst.  Which they may do, when they get old.


The full fix.

So now it’s one of those should-be-easy-but-potentially-white-knuckle plumbing repairs.

All the required parts connect together without tools.  The hoses, arresters, and valves are put together with fittings similar to what you’d see on a garden hose.  But better quality.  They all use garden hose thread (GHT), either male (MHT) or female (FHT).  (At least they do here, YMMV.)

You tighten them hand-tight*.  Maybe give them a small fraction of a turn beyond hand-tight using a weakly-held set of water-pump pliers.  Never use a tool to tighten the fitting (the female exterior bit) all the way to tight, as in, can’t move.  That’s not how they work, and if you do, you’ll screw them up.  That’s what they say and I believe them.

* being careful not to cross thread them on (e.g.) the plastic MHT fittings on the back of the washer.   GHT is not like pipe thread.  It doesn’t get progressively harder to turn, like pipe thread.  Properly aligned, it should turn several full turns with just a light finger grip. It stops when male, gasket, and female meet, not when the threads dictate.

So, about $100 and two fun-filled hardware store trips later, and I have the parts I need.

These, I have laid atop my honored and increasingly venerable Speed Queen washer. Long may she live.

Because I have a non-standard setup, this fix depends on a) the water shutoffs for those pipes working, and b) about half-a-dozen GHT joints coming cleanly apart, after being connected for close to 15 years.

It’s old plumbing.  I expect something to go wrong.  Perhaps catastrophically wrong.  Perhaps not.  I just have no clue what, and how serious it will be.

I’m phobic about it, to be honest.  Plumbing disasters feature prominently in my literal nightmares.

But today, Cloacina, the Roman goddess of plumbing, smiles upon me.   All goes as well as I could hope.  Little water is on the floor.  Nothing obviously drips. A test load demonstrates that the pipes have gone quiet, at least for the time being.

Cloacina willing, I’ll revisit that no sooner than half-a-decade from now.

Post #1965: Friday/Saturday this-n-that. Part 1: A state of decaffeination

 

It’s a flannel shirt day for sure.  Overcast, cold, with occasional showers.  Perhaps even an un-tucked flannel shirt day.

So I’m off to a slow start.  And I need to get my thoughts together anyhow.

Let me blog my way through a few things.  Starting with:

Continue reading Post #1965: Friday/Saturday this-n-that. Part 1: A state of decaffeination