The object-oriented life cycle model considers 'objects' as the basis of the software engineering process. The development team starts by observing and analyzing the system they intend to develop before defining the requirements. Once the process is over, they focus on identifying the objects of the system. Now, an object could be anything; it can have a physical existence like a customer, car, etc. An object also constitutes intangible elements like a process or a project.Advantages of Object-Oriented Life Cycle ModelApart from enhancing the system performance, object-oriented programming offers some advantages such as:Since it is data-focused and easy to work ... Read More
ProblemMention some of the legal and illegal declarations and initializations while doing C programming?Before discussing the legal and illegal statements let’s see how to declare and initialize the variables in C.Variable declarationFollowing is the syntax of variable declaration −SyntaxDatatype v1, v2, … vn;Where v1, v2, ...vn are names of the variables.For example, int sum;float a, b;Variable can be declared in two ways −local declarationglobal declarationThe ‘local declaration’ is declaring a variable inside the main block and its value is available within that block.The ‘global declaration’ is declaring a variable outside the main block and its value is available throughout the ... Read More
Life Cycle Phases of Data AnalyticsThe Data Analytics Lifecycle is a cyclic process which explains, in six stages, how information in made, collected, processed, implemented, and analyzed for different objectives.Data DiscoveryThis is the initial phase to set your project's objectives and find ways to achieve a complete data analytics lifecycle. Start with defining your business domain and ensure you have enough resources (time, technology, data, and people) to achieve your goals.The biggest challenge in this phase is to accumulate enough information. You need to draft an analytic plan, which requires some serious leg work.Accumulate resourcesFirst, you have to analyze the ... Read More
Testing Shows the Presence of DefectsEach application must pass through a search of testing phases such as system integration testing, user acceptance testing and beta testing, etc. before they are released into production. Some form of defects will always be found, Regardless of how much testing one conducts.The core purpose of the testing team should focus on finding the defects in an application. The inspection team must use different methods to discover as many errors as they can. It helps in reducing the number of undiscovered errors in a software application. Even though the testing team fails to find any ... Read More
To display the data frame summary in vertical order, we can use lapply and cbind function along with the summary function. For example, if we have a data frame called df then the summary of df in vertical order can be found by using the below command −lapply(df, function(x) cbind(summary(x)))Example1Consider the below data frame −Live Demo> x1 x2 x3 x4 x5 df1 df1Output x1 x2 x3 x4 x5 1 4 0 2 2 6 2 7 2 4 1 7 3 7 2 3 3 6 4 4 0 4 5 2 5 5 2 ... Read More
To select rows of an R data frame that are non-Na, we can use complete.cases function with single square brackets. For example, if we have a data frame called that contains some missing values (NA) then the selection of rows that are non-NA can be done by using the command df[complete.cases(df), ].Example1Consider the below data frame −Live Demo> x1 x2 x3 df1 df1Output x1 x2 x3 1 1 NA NA 2 NA 5 3 3 1 5 NA 4 1 NA NA 5 NA 5 NA 6 NA 5 3 7 NA 5 NA 8 1 ... Read More
To create stacked plot with density using ggplot2, we can use geom_density function of ggplot2 package and position="stack". For example, if we have a data frame called df that contains two columns say x and y, where x is categorical and y is numerical then the stacked plot with density can be created by using the command −ggplot(df, aes(y, y=..density..))+geom_density(aes(fill=x), position="stack")ExampleConsider the below data frame −Live Demo> x y df dfOutput x y 1 C 3 2 C 5 3 B 4 4 A 7 5 B 1 6 A 6 7 D 4 8 C 3 9 C 7 ... Read More
To create a plot using ggplot2 by excluding values greater than a certain value, we can use subsetting with single square brackets and which function. For example, if we have a data frame called df that contains two columns say x and y, then the point chart by including values of x that are greater than 0 can be created by using the command −ggplot(df[which(df$x>0), ], aes(x, y))+geom_point()ExampleConsider the below data frame −Live Demo> x y df dfOutput x y 1 -0.62160328 0.38477515 2 0.68287365 -1.56169067 3 0.75259774 ... Read More
To make a plot title partially bold using ggplot2, we can use bquote function inside labs function and then changing the default font to bold using bold function as shown in the below examples. While using these functions we need to make sure that the title that we want to bold should be inside circular brackets appropriately.ExampleConsider the below data frame −Live Demo> x y df dfOutput x y 1 -0.62160328 0.38477515 2 0.68287365 -1.56169067 3 0.75259774 1.28849990 4 0.56688920 -0.17014225 5 1.22351113 -0.32446764 6 -1.54210099 ... Read More
To calculate monthly average for time series object, we can use tapply function with mean. For example, if we have a time series object called TimeData then the monthly average for this series can be found by using the command tapply(TimeData, cycle(TimeData), mean).Example1Consider the below time series object −Live Demo> Data1 Data1Output Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 1 988 695 867 211 915 348 729 518 592 447 448 880 2 551 410 427 134 133 572 637 800 630 878 642 940 3 603 335 638 639 595 512 671 863 752 ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP