vector
Following are the key points described later in this article:
oddnos = c( 1,3,5,7,9)
companies = c( "apple", "google", "microsoft")
Consider an example of doctors with following details:
Following code example displays command to store each of the above data and how to access them. Pay attention to the fact that vector of one type store data of same type. Following code example demonstrate vector of types such as following:
# Character Vector representing collection of doctors' names
docNames <- c( "chris", "calvin", "scott" );
# Numeric Vector representing collection of doctors' salary
docSalary <- c( 67345.50, 89765, 123432 );
# Integer Vector representing collection of doctors' age
docAge <- c( 25, 29, 27 );
# Access doctors' names
docNames # Displays [1] chris, calvin, scott
docNames [1] # Displays [1] chris
# Vector storing docNames and docAge
docSummary <- c( docNames, docAge );
# Display details as String; Pay attention that all data is converted as character vector
docSummary # Displays [1] "chris", "calvin", "scott", "25", "29", "27"
Last updated: 25th Jan, 2025 Have you ever wondered how to seamlessly integrate the vast…
Hey there! As I venture into building agentic MEAN apps with LangChain.js, I wanted to…
Software-as-a-Service (SaaS) providers have long relied on traditional chatbot solutions like AWS Lex and Google…
Retrieval-Augmented Generation (RAG) is an innovative generative AI method that combines retrieval-based search with large…
The combination of Retrieval-Augmented Generation (RAG) and powerful language models enables the development of sophisticated…
Have you ever wondered how to use OpenAI APIs to create custom chatbots? With advancements…