Search
 
SCRIPT & CODE EXAMPLE
 

R

nls in r

# Tmod, Tamb and GI are columns in the data frame data2
# Find the k coefficient to complete the equation
Model_Tmod <- nls(Tmod ~ Tamb + k * GI, data = data2, start=list(k=1))

k = coef(Model_Tmod)

And where ever there is an NA in Tmod column it gets filled with the predicted
data2$Tmod[is.na(data2$Tmod)] = data2$Tamb[is.na(data2$Tmod)] + k * data2$GI[is.na(data2$Tmod)]

Comment

PREVIOUS NEXT
Code Example
R :: convert a row to a column in r 
R :: how to change the index of a dataframe in r 
R :: remove rownumbers r 
R :: r library tidyverse 
R :: calculate correlation in r 
R :: histogram r add line 
R :: reorder levels of a factor in r 
R :: convert string to lowercase R 
R :: change all columns type in R 
R :: naming matrix in r 
R :: ggplot abline thickness 
R :: boucle sur r 
R :: extract residual from lm in r 
R :: r count list 
R :: read xlsx in r 
R :: r ggplot hide one legend group from multiple legends 
R :: absolute value in r 
R :: eleminating a char in of a list in r 
R :: r - split the data in queal ranges 
R :: extract rse from lm in r 
R :: change color theme of fill R 
R :: print in r 
Rust :: rust string to char array 
Rust :: making a web server in rust 
Rust :: debug rust 
Rust :: sum all elements of array rust 
Rust :: rust number squared 
Rust :: rust loop vector by size 
Rust :: rust comments 
Rust :: rmarmanriazi•rust•concept•polymorphism 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =