[This article was first published on R Consortium, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.
In the rapidly evolving sphere of pharmaceutical data analysis, a significant transition is taking place – the shift from traditional SAS to the versatile R programming language. Pfizer, a trailblazer in the pharmaceutical industry, is leading this change. We are excited to invite you to an exclusive webinar that will cover details about how Pfizer has succeeded and what the benefits are: “From Vision to Action: The Pfizer R Center of Excellence-led Journey to R Adoption,” scheduled for February 8th, 2024, at 3:00 pm ET.
At the heart of Pfizer’s data analysis revolution is the adoption of R – a language known for its robust community-driven development and open-source nature. This move is not just about changing tools; it’s about embracing a culture of innovation and collaboration.
The journey began with an internal query at Pfizer: How many of our colleagues are proficient in R? The answer led to the unveiling of a latent community of R users, eager yet unconnected. In 2022, an internal survey highlighted the presence of over 1,500 R users, a clear sign of a burgeoning community within Pfizer.
In response, Pfizer established the R Center of Excellence (CoE) in 2022. This initiative marked a shift from scattered individual efforts to a cohesive, strategic approach to R adoption. The CoE, celebrating its first anniversary in 2023, has become a linchpin in nurturing Pfizer’s vibrant R community.
Webinar Highlights:
This upcoming webinar, hosted by the R consortium, is more than just a case study. It’s a treasure trove of insights for fostering an engaged R community. The session will cover:
Pfizer’s journey in building a robust R community.
Practical strategies applicable across various industries.
Understanding the critical role of an engaged R community in data analysis.
Join Us for the Webinar:
This is an unmissable opportunity for anyone interested in data science, R programming, or community building within large organizations. By attending this webinar, you will gain firsthand insights into how Pfizer successfully integrated R into its data analysis practices and how you can apply these learnings to your organization.
Don’t miss this opportunity to learn from Pfizer’s experience and expertise. Register now for the webinar on February 8, 2024, at 3:00 pm ET and be a part of the conversation shaping the future of pharmaceutical data analysis.
The Transformation of Pharmaceutical Data Analysis: Pfizer’s Journey With R
In the ever-changing landscape of pharmaceutical data analysis, a key shift is taking place. Recognized industry leader Pfizer is transitioning from traditional SAS to the more flexible R programming language. This strategic move is reshaping the fabric of their analytics approach, promoting an environment of innovation and collaboration.
Commitment to R: A Strategic Shift in Pfizer’s Analytics
Pfizer’s commitment to the R programming language goes beyond simply adopting a new tool. It represents a holistic cultural change within the organization. Pfizer’s decision is shedding light on the importance of internal talent recognition and harnessing team potential to drive innovation.
An internal survey in 2022 revealed over 1,500 R users within the company. Responding to this latent potential, Pfizer established the R Center of Excellence (CoE) later that same year. This initiative has transitioned scattered individual efforts into a strategic movement towards R adoption while nurturing the R community within the company.
Potential Long-Term Implications
This shift to R could spark significant changes within Pfizer, leading to more collaborative, efficient, and innovative data analysis. The adoption of R could potentially yield many long-term benefits:
Efficient and effective communication: The open-source nature of R promotes collaboration and idea exchange within a peer community. This could align team efforts and foster a synergistic working ecosystem.
Innovation: As R is community-driven, it is likely to inspire innovative solutions and push the limits of pharmaceutical data analysis.
Skill development: The large scale adoption of R will necessitate continuous learning and upskilling within the organization, further elevating Pfizer’s analytics capabilities.
Future Developments and Recommendations
As other organizations observe Pfizer’s journey with R, it could inspire similar shifts across the industry. Companies might recognize the value of leveraging their latent internal expertise and promoting a culture of innovation and collaboration.
Organizations interested in making a similar transition could learn several key insights from Pfizer’s journey:
Identify in-house talent: Evaluating and recognizing existing skill sets within the organization can highlight potential untapped resources.
Create centers of excellence: Establishing a CoE can initiate a strategic approach towards wide-scale tool adoption and foster a thriving user community.
Promote continuous learning: Facilitate upskilling programs to ensure that all team members are competent with the new tool and can maximize its potential.
A webinar discussing Pfizer’s journey with R is scheduled for February 8, 2024. This session promises to provide valuable practical strategies and insights that could benefit any organization embarking on a similar path to data science proficiency.
Discover a collection of top courses to launch your dream career or master a new skill, all for free!
Implications and Future Developments of Free Online Education
The proliferation of free online courses has been remarkable, presenting a sea of opportunities for anyone with the desire to acquire new knowledge or skills. These learning tools are reinventing education and providing a platform for people, regardless of age, geographical location or financial status, to enhance their skills or start new careers. But what does the future hold for such initiatives? Let’s delve into some potential long-term implications and future developments.
Democratization of Education
The availability of free courses could lead to an unprecedented democratization of education. More people are given the opportunity to learn and grow, easing the usual constraints of time, money and distance. It also reduces the monopoly of certain institutions that traditionally provide high-quality education.
Continuous Learning
By offering a wider range of topics and skills to learn, these platforms encourage continuous learning. It means that learning would no longer exclusively occur within strict educational timelines, but throughout a person’s lifetime.
Increased Competition Among Job Seekers
With more people having access to a variety of courses, it may increase the competition level among job seekers. Every individual will potentially be more equipped and skilled, thus raising the bar for employment eligibility.
Changes in Traditional Education Models
In the long run, we could see an upheaval in traditional education models. Schools and universities might need to revise their curriculums and teaching methods to keep up with these self-paced online learning trends.
Future Developments
While it’s difficult to predict with certainty what developments we might see, two areas hold great potential:
Personalized Learning: As technology advances, these platforms could further tailor their offerings based on the individual learner’s needs, making education even more relevant and engaging.
More Collaborative Learning: Online platforms may evolve to foster more collaboration among learners, promoting a sense of community and interactivity.
Actionable Advice
Embrace Online Learning: If you haven’t made use of free courses yet, now is the time to start. Explore topics of interest or skills that could advance your career.
Keep Updated: Continually enhancing your knowledge can help you stay competitive. Develop a habit of lifelong learning.
Adapt to Change: Traditional modes of study might be transitioning. Be prepared for shifts in typical learning environments and methods.
In conclusion, the evolution of free online courses brings with it exciting possibilities. As we embrace them, we should also consider potential implications and adapt accordingly for a successful and rewarding learning journey.
[This article was first published on R | Discindo, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.
In the R/Shiny community we are fortunate to have several approaches for async programming.
It is an active field of development with a variety of
options depending on the needs of the application. For examples and deeper overviews of
the state of async programming in R, head over to Veerle van Leemput’s writing,
the Futureverse documentation or the mirai / crew repos.
In this post, I am going to focus on an approach to simplify making multiple
async calls in shiny applications. Really, it boils down to developing a module
that wraps the initialization and polling of a callr::r_bg process into a single
function, and makes it easier write a larger async-capable shiny app while
keeping the code a bit shorter, and more compact.
The problem
I am working on refactoring a relatively large shiny application where many of the
computations are time-consuming. Ideally, I would like to convert the major bottlenecks
into async routines. Typically, is is done by setting up future/promise constructs or
sending a job to a subprocess, keeping the main shiny process free, and then
polling the subprocess ‘manually’ to fetch the result (callr/mirai/crew).
After reviewing the available options, and trying a few things, I decided
to go with callr for async, although the mirai, and crew where close seconds.
This choice was mostly because of callr’s simplicity and because I have previous
experience with it.
The callr workflow can be sumarised in the following steps:
send a call to the subprocess (possibly within a reactive and dependent on events within shiny)
monitor the status of the background process to know when to fetch the results
the polling observer has to have a switch, so we don’t waste resources on polling
while there is nothing running.
In all, its probably some 15-20 lines of code, depending on the complexity of
the function call we are sending to the subprocess. It looks something like this:
# The function we want to run async
# (sleep is added to mimic long computation)
head_six <- function(x, sleep) {
Sys.sleep(sleep)
head(x)
}
# the r_bg call
args <- list(head_six = head_six, x = my_data, sleep = 5)
bg_process <- callr::r_bg(
func = function(head_six, x, sleep) {
head_six(x, sleep)
},
args = args,
supervise = TRUE
)
# turn on polling after the task has been sent to the subprocess
poll_switch <- shiny::reactiveVal(TRUE)
# reactive to store the result returned by the subprocess
result_rct <- shiny::reactiveVal(NULL)
# monitor the background process
shiny::observe({
shiny::req(isTRUE(poll_switch()))
shiny::invalidateLater(300)
message("checking")
alive <- bg_job()$is_alive()
if (isFALSE(alive)) {
res_rct(bg_job()$get_result())
message("done")
poll_rct(FALSE)
}
})
# do stuff with `result_rct()`
Having to write this in 20 different places where async might be needed in
an application is definitelly a chore, not to mention error-prone as one needs
to keep track of the names of the process objects, polling switches, and result
reactives. Then of course, some async bits would need to respond to events, like
button clicks or other reactives in the shiny session, while others would need
to run without explicit triggers, adding to the complexity and maintanence of the
codebase.
The solution
I wanted to simplify the above process and make it quicker to write the async
code. I wanted a function or a module server that would take a function by name
and its arguments and then run the function in a background process, poll the
process and return the result when ready. Additionally, I wanted this module
to be flexible enough such that one can trigger the execution from the outside
(e.g., from the parent module) or to run without external triggers.
In the end, I came up with a solution with 3 components: the function that does the
long computation, an async version of this function, and a module server that
will do the shiny things. Bellow are the 3 parts starting with the trivial head_six
function (same as above):
# The function we want to run async
# (sleep is added to mimic long computation)
head_six <- function(x, sleep) {
Sys.sleep(sleep)
head(x)
}
The async version of the function is a wrapper that is prepared manually for the
function we need to run async. It is abstracting the callr::r_bg call, and
can live in a separate script (together with the function it wraps) instead
of the shiny server. There probably are ways to generate this function with
code, and I might try that soon, but for now creating this wrapper does not
bother me much. Having an async function that you can test and debug interactivelly
might actually be preferred.
# Async version of `head_six`
# calls `r_bg` and returns the process object
head_six_async <- function(x, sleep) {
args <- list(head_six = head_six, x = x, sleep = sleep)
bg_process <- callr::r_bg(
func = function(head_six, x, sleep) {
head_six(x, sleep)
},
args = args,
supervise = TRUE
)
return(bg_process)
}
The third part is the function (module server) that calls the async version of
the function doing the time-consumig task. The module also has reactives
to switch polling on/off, and an observer to monitor and fetch the result. It
returns a list with two elements, a reactive with the result of the async
job, and a function that updates the polling reactive (poll_rct) that allows
one to initiate the task from the outside. For example if we had a button in
another module that should trigger the computation inside this async module.
Note that this is not a typical shiny module, in that it does not have
(and does not strictly need) a UI part. So we don’t have to worry
about the namespace (ns <- session$ns) inside it. We simply want to observe
and return. One could add a UI component to, perhaps, notify the user about the
progress (checking, checking, … done) of the async job.
With this module, refactoring to async becomes more streamlined. For example,
we could have a scenario like this.
server <- function(input, output, session) {
# async job triggered on event (input$go_async_job1)
async_job1 <- mod_async_srv(
id = "job1_srv",
fun_async = "job1_async",
fun_args = list(x = x, z = z),
wait_for_event = TRUE
)
observeEvent(input$go_async_job1, {
async_job1$start_job()
})
output$x <- renderPlot({
plot_fun(async_job1$get_result())
})
# async job that runs without external intervention
async_job2 <- mod_async_srv(
id = "job2_srv",
fun_async = "job2_async",
fun_args = list(a = a, b = b),
wait_for_event = FALSE
)
output$y <- renderPlot({
table_fun(async_job2$get_result())
})
}
Note that the two instances of mod_async_srv use different async functions
with different sets of arguments, and are triggered in different ways. Providing
some flexibility, while keeping the server code minimal.
Nothing special here, no magic, just some wrappers to make life a bit easier when
writing large shiny applications with async capabilities.
Demo
To test out this approach you can download the following gist. In it, I have
two callr background async jobs, to show the head of iris and mtcars,
with different sleep time. The iris job waits for user click, while the mtcars job runs on its own when the app starts. Neither async job blocks
the main shiny process, as they are both in the background, so the slider and
histogram work throughout.
Summary
In this post I went over an approach to organize callr background async jobs using a module, in order to make the async code faster to write, less error prone and overall cleaner.
To leave a comment for the author, please follow the link and comment on their blog: R | Discindo.
Long-term Implications and Future Developments in R/Shiny Asynchronous Programming
The use of asynchronous programming in R/Shiny is a topic of considerable importance among developers. Given its potential, there are several methods to achieve this result, depending on the needs of the application. Recently, a new approach has been proposed to simplify making multiple async calls in shiny applications: developing a module that bundles the initialization and polling of a callr::r_bg process into a single function. This method aims to make writing larger async-capable shiny apps more comfortable while keeping the code shorter and more compact.
Asynchronous Programming and Future Trends
The primary purpose of async programming is to make better use of CPU resources by allowing multi-threading. Working on several tasks simultaneously can help improve efficiency, particularly when many of the processes are computational and time-consuming. This feature is even more valuable in a world where applications and software platforms become increasingly complex.
The Shiny framework is a great tool to develop interactive web applications straight from R scripts. However, as these applications grown in size and complexity, expanding their async capabilities can bring multiple benefits. The outlined approach proposes an automatic initialisation and polling of async calls. This technique can reduce code length and keep it more compact, contributing to less error-prone development practices and easier maintenance.
Future Developments
Developments in R/Shiny asynchronous programming are ongoing, and for this specific approach, exploring code generation methods can automate the creation of async function wrappers. This development could further simplify the coding process, making the implementation of async programming even more straightforward.
Furthermore, considering user interactions could also be valuable. Including UI components that notify users about the progress of async jobs could enhance user experience by making the operation of async applications clearer.
Actionable Advice
Developers should consider the below strategies:
Understand user needs: Developers should evaluate the specific needs of users thoroughly before deciding on the most appropriate async programming method. Experiment with different methods, including the proposed module, to see which solution fits best their context.
Use resources efficiently: Try to allocate computing resources efficiently when designing software. Async programming allows multitasking, which preserves resources.
Stay updated: The landscape of async programming in R/Shiny is dynamic. Staying current with advancements in the field can provide insights into more efficient and effective programming techniques. Developers should check out literature such as Van Leemput’s research and the Futureverse documentation for recent practices, concepts, and insights.
Continuously improve: There is always room for improvement in programming. That includes code automation, which can simplify processes and improve efficiency.
In Conclusion
Async programming in R/Shiny holds great potential for future development and offers numerous opportunities to develop more robust and efficient applications. As the field continues to progress, so too will the available techniques and methodologies, each offering unique advantages to meet different application needs.
Discover a collection of best books to start your data career or master a new skill, all for free!
The Future of Data Careers: A Look at Free Online Resources
With the advent of big data and technology advancement, a career in data science and analytics can be both fascinating and lucrative. From handling large amounts of data to solving complex business problems, this field offers myriad opportunities for growth. But for aspiring data professionals or those looking to expand their skill set, finding valuable resources can be daunting.
“Discover a collection of best books to start your data career or master a new skill, all for free!”
Long-Term Implications
The availability of free online resources signals a crucial shift in the education paradigm. It democratises learning, giving everyone access to high-quality educational material regardless of financial capability. Also, this could lead to more people becoming self-taught data professionals, making the field even more competitive.
Possible Future Developments
As more and more companies recognize the value of big data and its impact on business decisions, the demand for skilled professionals will likely grow. These free resources could be expanded to include more advanced data science topics, including machine learning and artificial intelligence. As their platforms grow, these online resources might even consider launching credential programs or partnering with academic institutions for certification.
Actionable Advice
Always Be Learning: Whether you’re a beginner or an experienced professional, take advantage of these free resources to continually enrich your understanding and sharpen your skills.
Practice: As practical application is key in data science, don’t just read these books. Apply what you learn in real-life projects. Use open source tools and datasets to improve your skills.
Connect with the Community: Join online forums and communities where data professionals share their experiences and insights. Not only does this offer learning opportunities, but it can also lead to professional connections.
Give Back to the Community: Once equipped with knowledge and experience, revisit these free resources and consider contributing your learning. This way, you help maintain the cycle of free knowledge.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.
The rOpenSci community is supported by our Code of Conduct with a clear description of unacceptable behaviors,
instructions on how to make a report, and information on how reports are handled. We, the Code of Conduct Committee,
are responsible for receiving, investigating, deciding, enforcing and reporting on all reports of potential
violations of our Code. We are committed to transparency with our community while upholding the privacy
of people who experience or report incidents.
In 2023, we received one Code of Conduct incident report.
Summary of reported incident
Description of the incident: We received a Code of Conduct report regarding sharing a paywalled article in Slack. After review, we found that this conversation did not violate the Code of Conduct guidelines. The conversation was voluntarily deleted from Slack by its participants.
Community space: Slack
This code of conduct belongs to the community. We welcome your feedback at any time by emailing conduct@ropensci.org.
Understanding the rOpenSci Code of Conduct and its Implications
The rOpenSci community operates with a defined Code of Conduct that describes unacceptable behaviors, provides instructions for making a report, and outlines how these reports are handled. The Code of Conduct Committee is responsible for maintaining, evaluating, and enforcing this code, ensuring ethical behavior within the community. In 2023, the committee reviewed and resolved one incidence report related to sharing a paywalled article over Slack, demonstrating a commitment to upholding the rules of the community.
Long-term Implications
Having a strong and crystal-clear Code of Conduct within any community paves the way for an environment that respects and upholds ethical guidelines. This incident report showcases the active engagement by the Code of Conduct Committee in maintaining these standards, even when violations come from seemingly smaller activities like content sharing.
In the future, the rOpenSci community will likely continue to uphold these ethical standards to maintain a positive and respectful atmosphere. This involves thorough investigation of any reported incidents and their efficient handling to ensure uncompromised compliance.
Potential Future Developments
As digital interactions evolve, there may be new forms of conduct that communities have to address. The rOpenSci community’s procedure of analyzing each report on a case-by-case basis provides flexibility to adapt to these emerging trends. However, updating the Code of Conduct to include potential new areas of violations might be necessary as prominent issues arise.
Developments in chat platforms’ features could lead to potential new sources of violations like multimedia sharing, usage of emoticons or graphics, among others.
Moving forward, there might also be added considerations around context sensitivity and cultural differences as global online communities expand further.
The evolution of cybersecurity can present new challenges for Slack groups and other similar spaces, and new provisions may need to be incorporated into the Code of Conduct.
Actionable Advice
Ensure Regular Review and Update of the Code: This is critical to adapt to evolving digital interaction practices. The committee should stay informed about emerging forms of conduct, both positive and negative.
Maintain Transparency: As evident from this incident reporting and its resolution, transparency increases trust within the community. Continue sharing summaries of incident reports as feasible while respecting involved parties’ privacy.
Active Community Participation: Encourage members to be active participants in maintaining the Code of Conduct, including reporting potential violations and giving feedback on the Code itself.
Never underestimate any algorithms that we can use.
The Power of Algorithms: Key Points and Long-Term Implications
The critical point made in the given text is the significance and potential utility of algorithms. Regardless of their complexity or simplicity, algorithms often possess incredible potential that we should never underestimate. They can streamline operations, solve complex problems, facilitate decision-making, enhance accuracy, and automate processes in the most effective and efficient manner.
Long-Term Implications of Algorithms
In the long run, the incorporation of algorithms into various sectors promises substantial changes. The significant role algorithms already play in our everyday lives – from simple tasks such as Google searches to more complex operations such as stock trading and medical diagnostics – is bound to further increase.
One of the potential long-term implications is automation. The rise of algorithms has already proven essential in accomplishing manual tasks efficiently and accurately. As algorithms continue to improve, we could see an increased degree of automation across multiple sectors, positively impacting productivity and consistency.
Moreover, algorithms can ultimately shape the landscape of decision-making – helping us to make accurate, timely, and data-driven decisions. Consequently, organizations worldwide are likely to rely even more on algorithms to drive strategy, innovation, and growth.
Possible Future Developments
A future development we might anticipate is the coming generation of self-evolving algorithms. As machine learning and artificial intelligence technologies continue to progress, algorithms are likely to become even more sophisticated, capable of learning and improving independently over time.
We also predict the emergence of “algorithmic job roles” where specialized professionals will control these algorithms, analyze their performance, and aid in their improvement.
Actionable Advice Based on These Insights
Embrace the Algorithm: To adapt to this future landscape, organizations and individuals should strive to understand and harness the power of algorithms. Whether you’re a business owner, employee, or self-employed professional, understanding how algorithms work and how they can benefit you is crucial.
Educate Yourself: It is advisable to get comfortable with algorithms. Individuals should seek education and training to understand these powerful tools better.
Invest in AI and Machine Learning: Forward-thinking enterprises should also consider investing more heavily in AI and machine learning technologies. Such investment can help these businesses develop more efficient and effective algorithms.
Partner with Professionals: For those not inherently tech-savvy, collaborating with software developers, data scientists or companies specializing in algorithms could be a great way to stay competitive in an increasingly digital world.
In conclusion, never underestimate the power of algorithms. Appreciate their potential, understand their operation, and harness the benefits they can bring to the digitalization of your operations.