Using Regular Expression in R - r

Hi I am trying to extract a single sentence from a paragraph in R
"[report_beginning]
101962493|2011-06-09|final|Omary, Lea, M.D.|43654754|Major Academic Center
_Ms.Wattley is a 88 year-old patient who comes in today with a chief complaint of PREG/SPOTTING.
ALLERGIES:  none
SOCIAL HISTORY:  The patient Ms.Wattley is a past smoker who has a visiting nurse. Patient is bed-bound.
PHYSICAL EXAMINATION:  Blood pressure 125/98, pulse 55, respiratory rate 7, temperature 98.7, and O2 saturation 98 on room air.  General:  This is a patient in severe distress.  
EMERGENCY DEPARTMENT COURSE:  I confirm that I have seen and evaluated the patient, reviewed the resident's documentation on the patient's chart. The following procedures were performed: Medication:medication given. Procedure:no procedures performed. Testing:testing conducted . Please review the chart for more details.
DISPOSITION:  The patient was admitted to the hospital with a primary diagnosis of Threatened abortion, antepartum condition or complication.
And so this is one cell. I have a column full of data like this and I want to extract a single line. "PHYSICAL EXAMINATION:  Blood pressure 125/98, pulse 55, respiratory rate 7, temperature 98.7, and O2 saturation 98 on room air."
How can I do this with Regular expression in R?
I have been using the following code but it doesn't work. It gives me an empty dataset
x=grep("Blood pressure .+ air. ", ed_dia, value = TRUE)

I'm assuming that "[report begiinning is not actually in the data file, so opening a text connection to read the file should succeed:
txt <- "101962493|2011-06-09|final|Omary, Lea, M.D.|43654754|Major Academic Center
_Ms.Wattley is a 88 year-old patient who comes in today with a chief complaint of PREG/SPOTTING.
ALLERGIES: Â none
SOCIAL HISTORY: Â The patient Ms.Wattley is a past smoker who has a visiting nurse. Patient is bed-bound.
PHYSICAL EXAMINATION: Â Blood pressure 125/98, pulse 55, respiratory rate 7, temperature 98.7, and O2 saturation 98 on room air. Â General: Â This is a patient in severe distress. Â
EMERGENCY DEPARTMENT COURSE: Â I confirm that I have seen and evaluated the patient, reviewed the resident's documentation on the patient's chart. The following procedures were performed: Medication:medication given. Procedure:no procedures performed. Testing:testing conducted . Please review the chart for more details.
DISPOSITION: Â The patient was admitted to the hospital with a primary diagnosis of Threatened abortion, antepartum condition or complication. "
inp <- readLines( textConnection(txt))
So after data input it only remains to use grep to identify the lines with "PHYSICAL EXAMINATION" (I wasn't sure if the space may needed special regex-handling) in them and then use "[" to extract from the multiple lines:
inp[ grep("PHYSICAL[ ]EXAMINATION", inp)]
#[1] "PHYSICAL EXAMINATION: Â Blood pressure 125/98, pulse 55, respiratory rate 7, temperature 98.7, and O2 saturation 98 on room air. Â General: Â This is a patient in severe distress. Â "

Related

Time series forecasting of outcome variable based on current performance of outcome variable in R

I have a very large dataset (~55,000 datapoints) for chicken crops. Chickens are grown over ~35 day period. The dataset covers 10 sheds of ~20,000 chickens each. In the sheds are weighing platforms and as chickens step on them they send the weight recorded to a server. They are sending continuously from day 0 to the final day.
The variables I have are: House (as a number, House 1 up to House 10), Weight (measured in grams, to 5 decimal points) and Day (measured as a number between two integers, e.g. 12 noon on day 0 might be 0.5 in the day, whereas day 23.3 suggests a third of the way through day 23 (8AM). But as this data is sent continuously the numbers can be very precise).
I want to construct either a Time Series Regression model or an ML model so that if I take a new crop, as data is sent by the sensors, the model can make a prediction for what the end weight will be. Then as that crop cycle finishes it can be added to the training data and repeat.
Currently I'm using this very simple Weight VS Time model, but eventually would include things like temperature, water and food consumption, humidity etc.
I've run regression analyses on the data sets to determine the relationship between time and weight (it's likely quadratic, see image attached) and tried using randomForrest in R to create a model. The test model seemed to work well in regards to the MAPE value being similar to the training value, but that was by taking out one house and using that as the test.
Potentially what I've tried so far is completely the wrong methodology but this is a new area so I'm really not sure of the best approach.

how I can evaluate a single arm treatment without control group?

I am going to Evaluation of combined surgical and antibiotic treatment for Diabetic foot ulcers, 30 patients with Diabetic foot ulcers were enrolled in this study, and the date of first and last visit was recorded (treatment duration time in weeks were calculted), I considered this study as single-arm treatment as there I had no control group. I recorded the CRP before and after the treatment, the patients with an absolute difference in CRP less than 10 were considered as healing otherwise no healing will be recorded. How I can start with R cran evaluating my treatment. Statistics approach, and methodology
Thanks in advance.
My data
crp_before = c(96.1,90.4,114.4,88.3,76.1,191.2,69.8,122.3,188.6,77.3,126.8,189.3,165.2,116.8,72.3,120.9,122.3,115.2,90,142.3,87.2,195.5,184.3,110.2,113.6,147.4,96.8,116.4,55.3,209)
crp_after = c(5.3,7,6.2,3.5,4.2,9.6,5.2,5.3,9.6,8,7.6,11,10.3,4.6,3.2,8.6,7.5,8.4,6.3,7.6,6.8,112,6.3,8.5,9.2,5.3,4.1,7.6,3,100)
time_week = c(9,8,12,8,4,24,4,8,24,4,12,24,20,12,5,12,13,12,8,16,8,24,24,8,8,16,8,12,3,4)

Is It Appropriate to Conduct Interrupted Time Series (ITS) Analysis or Repeated-Measures Panel Analysis When Intervention Start Dates Vary?

I am attempting to estimate the causal effect of intervention receipt (i.e., enrollment in a case management program) on a set of count outcomes (i.e., monthly visits to the doctor). Individuals enroll in the case management program at different points in time (e.g., an individual can enroll in the program anytime between 01/2017 and 01/2022). I have count data on the number of monthly doctor visits for each client for each of the 24 months prior to program enrollment and the 24 months following program enrollment. I want to estimate whether the number of doctor visits decreases following enrollment in the case management program.
Most of the interrupted time series (ITS) research for count data (e.g., negative binomial count models using tscount in R) I have come across uses population-level interventions which occur at one discrete time-point (e.g., July 1, 2018) instead of individual-level interventions which occur at varying time-points (e.g., one client enrolls on July 1, 2018; another client enrolls on January 1, 2019). I would appreciate any guidance on how to explore this question going forward (e.g., is an ITS design where intervention start dates vary across individuals even appropriate analytically or would some version of a repeated-measures panel approach with an intervention dummy be more appropriate)? Thanks!

Error in YAML while scanning a simple key at line 17, column 5 could not find expected ':' at line 22, column 1

I am trying to use rmarkdown::render_site() in order to build a website.
Whenever I run the Build Website in R, an error appears like this..
Error in yaml::yaml.load(..., eval.expr = TRUE) :
Scanner error: while scanning a simple key at line 17, column 5 could not find expected ':' at line 22, column 1
Calls: ... default_site -> site_config -> yaml_load ->
Execution halted
My codes are
title: "Who is into Green Infrastructure"
author: Sun
subtititle: Motivation of Green Infrastructure Parcipation
---
# Introduction
Due to global warming, one of the difficulties that the urban
environment face is the increase of precipitation. There is a chance
that this will lead to water pollution as the stormwater that runs
through the urban impervious surface collects pollutants and enters the
sewer system. There has been continuous effort to implement green
infrastructure to adapt to this environmental change. However there are
certain limits because this involves the voluntary participation of
individual households. This study will help understand the motivation of the participants of the past rain barrel project and help guide environmental organizations to plan how to increase participation.
This project will analyze the motivation of households participating in the rain barrel project by comparing contributing factors which are the education attainment and median income at the census tract level. The education attainment and income of the people participating in this project will be represented as a map. Then the shapefile of the rain barrels will be overlapped in order to analyze the demographic characteristic of households participating in the project.
# Materials and methods
```
{r}
1+2
```

Applying different functions to different elements in a nested list

I have a nested list:
my_list <- list(id1 = list(Overview = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC001CA/overview.json",
Climate = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC001CA/climatic-features.json",
Physiography = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC001CA/physiographic-features.json",
Soil = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC001CA/soil-features.json",
Ecology = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC001CA/ecological-dynamics.json"),
id2 = list(Overview = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC002CA/overview.json",
Climate = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC002CA/climatic-features.json",
Physiography = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC002CA/physiographic-features.json",
Soil = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC002CA/soil-features.json",
Ecology = "https://edit.jornada.nmsu.edu/services/descriptions/esd/022A/F022AC002CA/ecological-dynamics.json"))
I want to apply different functions to different sub-elements of the list. Here are the functions I want to apply:
Fns <- list(
function(x) fromJSON(x)$generalInformation$developmentStage,
function(x) fromJSON(x)$climaticFeatures$narratives$climaticFeatures,
function(x) fromJSON(x)$physiographicFeatures$intervalProperties,
function(x) fromJSON(x)$soilFeatures$texture$texture,
function(x) fromJSON(x)$ecologicalDynamics$narratives$ecologicalDynamics
)
There are 5 sub-elements in each list. The 5 provided functions should be applied in the order provided to those sub-elements.
I have found a couple of useful resources.
This similar question uses map() as a solution. The problem is map() is only applied to a sub-element in a single position and I am unable to determine how to apply multiple functions to multiple positions using map().
The other similar question uses Map(). This question does apply different functions to different positions of a list, but it does not use a nested list.
Any recommendations for applying multiple different functions to multiple different listed elements in a nested list?
Thanks!
We can use lapply to loop over the list, then with Map loop over the 'Fns' and the the inner list element to apply the functions on the corresponding elements
library(jsonlite)
out <- lapply(my_list, function(x) {
x[] <- Map(function(fn, y) fn(y), Fns, x)
x} )
-output
> out
$id1
$id1$Overview
[1] "Approved"
$id1$Climate
[1] "The average annual precipitation ranges from 35 to 55 inches, and falls mostly in the form of snow from November to April. The mean annual air temperature ranges from 34 to 37 degrees Fahrenheit. The frost-free (>32F) season is 25 to 45 days, and the freeze-free (>28F) season is 35 to 60 days. \r\n\r\nMaximum and minimum monthly climate data for this ESD were generated using PRISM data (PRISM Climate Group, Oregon State University, http://prism.oregonstate.edu, created 4 Feb 2004.) and the ArcGIS ESD extract tool."
$id1$Physiography
property unit representativeLow representativeHigh rangeLow rangeHigh
1 Elevation ft 8500 12000
2 Slope % 8 75
$id1$Soil
[1] "Loamy coarse sand" "Coarse sand"
$id1$Ecology
[1] "Abiotic Features: \r\nThis ecological site occurs in the highest elevations of the northern subalpine LRU, typically between 9,000 and 10,000 feet on mountain slopes. Soils are derived from granitic parent material, and are shallow to moderately deep over paralithic granitic bedrock, with a sandy skeletal particle size class. Cold temperatures and a short growing season restrict development of less frost resistant conifers. Coarse soils with very low water holding capacity support a minimal understory. \r\n\r\nEcology-Disturbance Factors: \r\nIndividual whitebark pine trees are very slow growing, and may be up to1500 years old (Millar 2014). Stands are composed of multiple age-class single and multiple stem trees because of ongoing seedling establishment. Caching of whitebark pine seeds by Clark’s nutcracker is the primary mode of seed dispersal, with birds often caching seeds in open areas that are suitable for young seedlings. If all seeds are not consumed, they give rise to dense clusters of genetically similar whitebark pine. These clusters appear to be one tree with many stems, but are more often individual trees (Burns et al. 1990, Tomback et al. 2001a). In the absence of disturbance, ongoing recruitment from seed-caches occurs, leading to an increase in stand density over time. \r\n\r\nFire and avalanche are the primary natural drivers for succession. Fire ignition is frequent on these exposed ridges and mountain peaks, but there is minimal and discontinuous fuel to carry large or hot fires. Small fires may play a minor role in maintaining openings that favor the germination and survival of young whitebark pine seedlings (Burns et al. 1990, Tomback et al. 2001b, Howard 2002). Avalanche is common among the alpine peaks and ridges, and can remove swaths of vegetation in avalanche prone chutes or below wind formed cornices. \r\n\r\nWhitebark pine forests are threatened by the non-native Cronartium ribicola, the cause of white pine blister rust (WPBR) and the native mountain pine beetle (Dendroctonus ponderosae) (Cox 2000, Tomback et al. 2001b, Howard 2002). Severe epidemics of WPBR in combination with MPB outbreaks have killed large areas of forest in the Rocky Mountains, but the whitebark pine forests in the Sierra Nevada have not suffered as high mortality. There is a complex interaction between MPB outbreaks, WPBR infection, and climate. Mountain pine beetles prefer larger diameter trees (> 6 inch diameter at breast height), as these are necessary to complete their life cycle,, and attack at the warmer, lower elevation zone of whitebark pine. Mountain pine beetles preferentially attack trees infected by WPBR. White pine blister rust will infest all whitebark pines, regardless of age or elevation (Cluck 2014). \r\n\r\nMountain pine beetles are a native species in North American forests, but warmer temperatures have shifted the thermal zone for mountain pine beetles upslope, subjecting higher elevations of whitebark pine to beetle attacks (Craig 2010, Keane et al. 2012, Keane and al 2013). Severe mountain pine beetle epidemics cause high mortality of overstory trees, while suppressed understory trees may be released (Meyer and Safford 2014). A flush of regeneration may occur due to the reduction in the overstory canopy providing new areas for establishment. However, the decline in seed production due to the loss of large overstory trees will leave fewer seeds to be consumed by Clark’s nutcracker and other animals which leaves fewer seeds available for regeneration, threatening stand sustainability. \r\n\r\nThe non-native WPBR was introduced into North America near Vancouver, British Columbia in approximately 1910, and has been slowly spreading across the western United States and Canada. It currently occurs throughout the Cascades, and north and central Sierra Nevada. So far, it has not been detected on whitebark pine in the southern extent of the Sierra Nevada, but has been found on a whitebark pine in Yosemite National Park and in a high Sierra location on the western slope of the Sierra National Forest (Maloney 2011). A survey was conducted in 2009 to determine WPBR presence and effect on whitebark pine survivorship in the Lake Tahoe Basin. Mean incidence of WPBR among whitebark pine populations was 35 percent, with a range of 1 to 65 percent (Maloney et al. 2012). \r\n\r\nIn order for WPBR to infect whitebark pine several synchronous phenological and environmental factors need to occur. For infection to occur in five-needled white pines, relative humidity has to be greater than 90 percent, temperatures have to be between 35.6 and 64.4 degrees F (2 to 18 degrees C), and stomates need to be open to allow WPBR entry (Maloney 2011). The basidiospores, which infect whitebark pine, are released in fall from the alternate host currants (Ribes sp.), or less commonly, lousewort or Indian paintbrush (Pedicularis or Castilleja sp.). These spores do not travel far or last long in the environment, and years with late summer or early fall precipitation are most likely when infection will occur. Whitebark pine may have early onset winter dormancy, so stomates are closed at the time WPBR basidiospores are released (Maloney 2011). The onset of winter dormancy is dependent upon the length of the growing season (temperature), precipitation and soil available water capacity (AWC).\r\n\t\r\nThere appears to be a relationship between soils with higher AWC and higher infection rates or intensity of stem girdling (Maloney et al. 2012). Higher soil moisture could increase WPBR mycelium growth rates and increase basidiospore production, while also allowing for whitebark pine stomates to remain open longer in the season, increasing the probability of infection (Maloney et al. 2012). This ecological site occurs on shallow to moderately deep sandy-skeletal soils, with lower AWC than the corresponding volcanic ecological site (R022AC200CA), and is likely less susceptible to WPBR infestation. A 2009 inventory of WPBR showed that the whitebark stands occurring on granitic soils had infestation rates ranging from 1 to 19%, while stands on volcanic soils ranged from -- to 65% (Maloney et al. 2012). \r\n\r\nThe main impact of WPBR on whitebark pine is reduction in stand cone production due to die-back of cone bearing branches from cankers girdling the branches. Mortality rates in older trees are low, and may take decades to occur. Younger trees may be killed quickly if main stem girdling causes disruption of water flow (Maloney et al. 2012). A few studies have been conducted on genetic resistance to WPBR, and results range from no resistance (Maloney, personal communication), to 26 to 47 percent in the Rocky Mountains and the Pacific Northwest (Keane et al. 2012). \r\n\r\nReduced seed production affects the presence and abundance of Clark’s nutcracker, and thus the number and distribution of seed caches (Tomback and Resler 2007, Keane et al. 2012). This can lead to recruitment below the threshold required to sustain populations (McKinney et al. 2009). \r\n\r\nPredictions about climate change suggest that the whitebark pine communities in the Sierra Nevada Mountains may be threatened by rising temperatures and precipitation changes. Recent California based climate models predict a 9 degree F increase in temperature by 2100, and broader models predict a 2 to 4 degree F increase in winter and 4 to 8 degree increase in summer (Safford et al. 2012). Models are more variable for precipitation, but local models for the Sierra Nevada, predict similar to slightly less precipitation. Most models agree that summers will become drier, since more of the precipitation is predicted to come as rain, and snow melt-off will occur earlier in spring (Hayhoe et al. 2004, Safford et al. 2012). Presently a severe drought is occurring in the Sierra Nevada, with 10 to 30 percent of average precipitation and very little snow accumulation. Whether this is climate driven, and thus will become more of the future normal remains to be seen. \r\n\r\nHigh elevation areas with suitable soils and landforms for the upward migration of whitebark pine will be important for the sustainability of this community. However, in this region of the central Sierra Nevada, whitebark pine already occurs at the upper most elevations of the highest mountains in the area, so has little room to move upslope. The southern Sierra Nevada, with its higher mountain peaks, may prove to be an important refugium for this species. \r\n\r\nThe historic temperature range for this ecological site is between 34 to 37 degrees F. With a 2 to 6 degree warming, species such as Sierra lodgepole pine (Pinus contorta var. murrayana), or mountain hemlock (Tsuga mertensiana) may become dominant in this zone. A 9 degree warming shift over the next 85 years could make conditions favorable for upper montane species to establish. Species such as Jeffrey pine (Pinus jeffreyi) and California red fir (Abies magnifica) could survive with the longer growing season and warmer temperatures for seedling germination and leader growth. If lower elevation conifers establish in the whitebark pine zone, whitebark pine may become a seral species, dependent upon fire for continued regeneration and elimination of competitors. \r\n\r\nThe reference state consists of the most successionally advanced community phase (numbered 1.1) as well as other community phases that result from natural and human disturbances. Community phase 1.1 is deemed the phase representative of the most successionally advanced pre-European plant/animal community including periodic natural surface fires that influenced its composition and production. This phase is determined from the oldest modern day remnant forests and/or historic literature. \r\n\r\nAll tabular data listed for a specific community phase within this ecological site description represent a summary of one or more field data collection plots taken in communities within the community phase. Although such data are valuable in understanding the phase (kinds and amounts of ground and surface materials, canopy characteristics, community phase overstory and understory species, production and composition, and growth), it typically does not represent the absolute range of characteristics nor an exhaustive listing of species for all the dynamic communities within each specific community phase."
$id2
$id2$Overview
[1] "Approved"
$id2$Climate
[1] "The average annual precipitation ranges from 35 to 55 inches, and falls mostly in the form of snow from November to April. The mean annual air temperature ranges from 34 to 37 degrees Fahrenheit. The frost-free (>32F) season is 25 to 45 days, and the freeze-free (>28F) season is 35 to 60 days. \r\n\r\nMaximum and minimum monthly climate data for this ESD were generated using PRISM data (PRISM Climate Group, Oregon State University, http://prism.oregonstate.edu, created 4 Feb 2004.) and the ArcGIS ESD extract tool."
$id2$Physiography
list()
$id2$Soil
[1] "Loamy coarse sand" "Coarse sand"
$id2$Ecology
[1] "Abiotic Features: \r\n\r\nThis ecological site occurs in the highest elevations of the northern subalpine LRU, typically between 9,000 and 10,000 feet on north facing mountain slopes. Soils are derived from granitic parent material, and are moderately deep over paralithic granitic bedrock, with a sandy skeletal particle size class. North-facing aspects hold snow for longer into the summer, providing additional moisture that allows mountain hemlock to be co-dominant or dominant over whitebark pine. \r\n\r\nEcological Features: \r\n\r\nThe high elevations in which this site occurs are buried with deep snow from November to June and remain cool for most of the year. Several physiological adaptations allow mountain hemlock and white bark pine to survive in this cold environment. Both species have maximum photosynthetic rates at colder temperatures than lower elevation trees, and close stomata to reduce water loss during dry or cold periods (Smith and Hinckley 1995). The tips of mountain hemlock branches are very flexible, an attribute that reduces snow build-up and stem breakage. Snow burial can be helpful in protecting trees from strong winter winds, desiccation from warm winter winds and sunny winter days, extreme cold, and repeated freezing and thawing (Arno and Hammerly 1984). Snow burial can, however, be detrimental as well. For example, portions of trees exposed above the snow can die back, leaving short multi-stemmed trees. Snow creep can create J shaped tree trunks, and avalanches can destroy swaths of forest. \r\n\r\nTimberline trees are able to withstand extremely cold winter conditions when they are dormant, but need at least a 2 to 3-month frost free growing period in the summer. Leaves, shoots, cones, and new seedlings develop during this short growing season, typically from mid-June through August. As elevations increase, temperatures drop and the growing season is shortened. Growing season length is one of the limiting factors to determine treeline. Another is wind. Wind induced treelines can be caused by drought conditions, due to increased evapotranspiration (Tomback et al. 2001). \r\n\r\nWhitebark pine is a long-lived timberline tree species that grows 40 to 60 feet tall in favorable conditions. The cones are indehiscent, meaning they do not open at maturity. Caching of whitebark pine seeds by Clark’s nutcracker is the primary mode of seed dispersal. Seeds are often cached in open areas that are suitable for young seedlings. If all seeds are not consumed, they give rise to dense clusters of genetically similar whitebark pine. These clusters appear to be one tree with many stems, but are more often individual trees (Burns et al. 1990, Tomback et al. 2001a). In the absence of disturbance, ongoing recruitment from seed-caching occurs, leading to an increase in stand density over time.\r\n\r\nWhite bark pine germination and seedling survival is best in canopy openings, such as those created by small fires. This is especially important in areas where whitebark pine develops dense canopies or can be replaced by shade tolerant conifers, as in the northern Cascades and the Rocky Mountains (Arno and Hoff 1990, Tomback et al. 2001, Howard 2002) and the cool, north-facing slopes of this ecological site. The slow growing, shade-tolerant mountain hemlock will gradually gain dominance over whitebark pine in the absence of fire or other disturbance in this ecological site. \r\n\r\nDisturbance features: \r\n\r\nFire and avalanche are the primary natural drivers for succession in this site. Fire ignition is frequent on these exposed ridges and mountain peaks, but there is minimal and discontinuous fuel to carry large or hot fires. Small fires may play a minor role in maintaining openings that favor the germination and survival of young whitebark pine seedlings (Burns et al. 1990, Tomback et al. 2001, Howard 2002). Avalanche is common among the alpine peaks and ridges, and can remove swaths of vegetation in avalanche prone chutes or below wind formed cornices. \r\n\r\nNatural fire return intervals for whitebark pine and mountain hemlock forests in the Sierra Nevada are poorly documented. Fire occurrence for mountain hemlock in the Pacific Northwest may range from 400 to 800 years, and is typically stand replacing (Tesky 1992). However, the Pacific Northwest is much wetter and has a different stand structure than mountain hemlock in the Sierra Nevada. The mean fire return intervals for whitebark pine forest across the US range from 29 to 300 years, while moderate severity fires range from 25 to 75 years, and stand replacing fires occur at greater than 140 year intervals (Fryer 2002). These whitebark pine studies are primarily from areas where whitebark pine forms continuous forests, rather than the small, open stands typically found in the Sierra Nevada. \r\n\r\nWhitebark pine forests are threatened by the non-native Cronartium ribicola, the cause of white pine blister rust (WPBR) and the native mountain pine beetle (Dendroctonus ponderosae) (Cox 2000, Tomback et al. 2001b, Howard 2002). Severe epidemics of WPBR in combination with MPB outbreaks have killed large areas of forest in the Rocky Mountains, but the whitebark pine forests in the Sierra Nevada have not suffered as high mortality. There is a complex interaction between MPB outbreaks, WPBR infection, and climate. Mountain pine beetles prefer larger diameter trees (> 6 inch diameter at breast height), as these are necessary to complete their life cycle, and attack at the warmer, lower elevation zone of whitebark pine. Mountain pine beetles preferentially attack trees infected by WPBR. White pine blister rust will infest all whitebark pines, regardless of age or elevation (Cluck 2014). \r\n\r\nMountain pine beetles are a native species in North American forests, but warmer temperatures have shifted the thermal zone for mountain pine beetles upslope, subjecting higher elevations of whitebark pine to beetle attacks (Craig 2010, Keane et al. 2012, Keane and al 2013). Severe mountain pine beetle epidemics cause high mortality of overstory trees, while understory suppressed trees may be released (Meyer and Safford 2014). A flush of regeneration may occur due to the reduction in the overstory canopy. However, the decline in seed production due to the loss of large overstory trees will leave fewer seeds available for regeneration, threatening stand sustainability.\r\n\r\nThe non-native WPBR was introduced into North America near Vancouver, British Columbia in approximately 1910, and has been slowly spreading across the western United States and Canada (Maloney 2011). It currently occurs throughout the Cascades, and north and central Sierra Nevada. So far, it has not been detected on whitebark pine in the southern extent of the Sierra Nevada, but has been found on a whitebark pine in Yosemite National Park and in a high Sierra location on the western slope of the Sierra National Forest (Maloney 2011). A survey was conducted in 2009 to determine WPBR presence and affect on whitebark pine survivorship in the Lake Tahoe Basin. Mean incidence of WPBR among whitebark pine populations was 35 percent, with a range of 1 to 65 percent (Maloney et al. 2012). \r\n\r\nIn order for WPBR to infect whitebark pine several synchronous phenological and environmental factors need to occur. For infection to occur in five-needled white pines, relative humidity has to be greater than 90 percent, temperatures have to be between 35.6 and 64.4 degrees F (2 to 18 degrees C), and stomates need to be open to allow WPBR entry (Maloney 2011). The basidiospores, which infect whitebark pine, are released in fall from the alternate host currants (Ribes sp.), or less commonly, lousewort or Indian paintbrush (Pedicularis or Castilleja sp.). These spores do not travel far or last long in the environment, and years with late summer or early fall precipitation are most likely when infection will occur. Whitebark pine may have early onset winter dormancy, so stomates are closed at the time WPBR basidiospores are released (Maloney 2011). The onset of winter dormancy is dependent upon the length of the growing season (temperature), precipitation and soil available water capacity (AWC).\r\n\r\nThere appears to be a relationship between soils with higher AWC and higher infection rates or intensity of stem girdling (Maloney et al. 2012). Higher soil moisture could increase WPBR mycelium growth rates and increase basidiospore production, while also allowing for whitebark pine stomates to remain open longer in the season, increasing the probability of infection (Maloney et al. 2012). This ecological site occurs on shallow to moderately deep sandy-skeletal soils, with lower AWC than the corresponding volcanic ecological site (R022AC200CA), and is likely less susceptible to WPBR infestation. A 2009 inventory of WPBR showed that the whitebark stands occurring on granitic soils had infestation rates ranging from 1 to 56% ( 22% average), while stands on volcanic soils ranged from 34 to 65%(with an average of 49%(Maloney et al. 2012). \r\n\r\nThe main impact of WPBR on whitebark pine is reduction in stand cone production due to die-back of cone bearing branches from cankers girdling the branches. Mortality rates in older trees are low, and may take decades to occur. Younger trees may be killed quickly if main stem girdling causes disruption of water flow (Maloney et al. 2012). A few studies have been conducted on genetic resistance to WPBR, and results range from no resistance (Maloney, personal communication), to 26 to 47 percent in the Rocky Mountains and the Pacific Northwest (Keane et al. 2012). \r\n\r\nReduced seed production affects the presence and abundance of Clark’s nutcracker, and thus the number and distribution of seed caches (Tomback and Resler 2007, Keane et al. 2012). This can lead to recruitment below the threshold required to sustain populations (McKinney et al. 2009). \r\n\r\nMountain hemlock is not susceptible to WPBR or MPB, but trees over 80 years old are very susceptible to laminated root rot (Phellinus weirii). Laminated root rot can rapidly spread by root contact and kill acres of forests (Tesky 1992). \r\n\r\nReestablishment of mountain hemlock after a fire or other disturbance is often slow, and in some areas growth never regains its tree-like stature (Arno and Hammerly 1984). Mountain hemlock has relatively thick bark, but typically has dense, low branches that make the trees susceptible to canopy fires. Mountain hemlock has higher cone production, seed germination and seedling survival rates during years of higher precipitation. Mountain hemlock can also reproduce by layering. Mountain hemlock seeds are wind dispersed and germinate on the snow or soil surface. Seedlings do best with partial shade from whitebark pine or older mountain hemlocks. \r\n\r\nPredictions about climate change due to global warming suggest that the whitebark pine communities in the Sierra Nevada Mountains may be threatened by rising temperatures and precipitation changes. Recent California based climate models predict a 9 degree F increase in temperature by 2100, and broader models predict a 2 to 4 degree F increase in winter and 4 to 8 degree increase in summer (Safford et al. 2012). Models are more variable for precipitation, but local models for the Sierra Nevada predict similar to slightly less precipitation. Most models agree that summers will become drier, since more of the precipitation is predicted to come as rain, and snow melt-off will occur earlier in spring (Hayhoe et al. 2004, Safford et al. 2012). Presently a severe drought is occurring in the Sierra Nevada, with 10 to 30 percent of average precipitation and very little snow accumulation. Whether this is climate driven, and thus will become more of the future normal, remains to be seen. \r\n\r\nHigh elevation areas with suitable soils and landforms for the upward migration of mountain hemlock and whitebark pine will be important for the sustainability of this community. However, in this region of the central Sierra Nevada, whitebark pine already occurs at the uppermost elevations of the highest mountains in the area, so has little room to move upslope. The southern Sierra Nevada, with its higher mountain peaks, may prove to be an important refugium for this species. Mountain hemlock has more room to migrate as it occurs further to the north, and at lower elevations than whitebark pine. The southern Sierra Nevada is typically too dry for extensive mountain hemlock forest. \r\n\r\nThe historic temperature range for this ecological site is between 34 to 37 degrees F. With moderate warming on these northern aspects California red fir (Abies magnifica) is the most likely conifer to move into the area occupied by this ecological site. \r\n\r\nThe reference state consists of the most successionally advanced community phase (numbered 1.1) as well as other community phases that result from natural and human disturbances. Community phase 1.1 is deemed the phase representative of the most successionally advanced pre-European plant/animal community including periodic natural surface fires that influenced its composition and production. This phase is determined from the oldest modern day remnant forests and/or historic literature. \r\n\r\nAll tabular data listed for a specific community phase within this ecological site description represent a summary of one or more field data collection plots taken in communities within the community phase. Although such data are valuable in understanding the phase (kinds and amounts of ground and surface materials, canopy characteristics, community phase overstory and understory species, production and composition, and growth), it typically does not represent the absolute range of characteristics nor an exhaustive listing of species for all the dynamic communities within each specific community phase."

Resources