Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How would you fit a linear model over a scatter-plot?



How would you fit a linear model over a scatter-plot?..

Answer / Omveer Singh

"To fit a linear model over a scatter plot in R, use the lm() function. This function calculates the coefficients of the best fitting line.nnExample:n```Rnx <- c(1, 2, 3, 4, 5)ny <- c(2, 4, 6, 8, 10)nlm_fit <- lm(y ~ x)nsummary(lm_fit)n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More R Programming Interview Questions

What is R lists?

1 Answers  


Explain tcp/ip applications, services and protocols?

1 Answers  


How would you create a scatterplot using ggplot2 package?

1 Answers  


Describe nchar() in r string manipulation?

1 Answers  


What are R Functions?

1 Answers  


What are useful s3 method functions?

1 Answers  


How do you install a package in r?

1 Answers  


Which function helps you perform sorting in r language?

1 Answers  


How many ways are there to read and write files?

1 Answers  


Which data structure is used to store categorical variables?

1 Answers  


What is the difference between rnorm and runif functions ?

1 Answers  


What is the use of abline() function?

1 Answers  


Categories