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

Write the syntax to set the path for current working directory in r environment?

1 Answers  


What is the rattle package in r?

1 Answers  


What is using all() and any()?

1 Answers  


What are the different components of grammar of graphics?

1 Answers  


What is a white noise model and how can you simulate it using r?

1 Answers  


Enlist the addition function used in R language?

1 Answers  


How using rprof() to find slow spots in your code in r?

1 Answers  


What is the power analysis?

1 Answers  


What do you understand by data visualization in R using ggplot2?

1 Answers  


How do you install a package in r?

1 Answers  


how would you build a scatter-plot using plotly?

1 Answers  


What is reference class?

1 Answers  


Categories