I have a longitudinal data set with two people in which the rows of data are numbered as 'episodes', and some episodes have a test 'result'. The goal of the bel
I am doing some easy linear mixed effects model as below: lmer( as.numeric(o.m_20_r_coded)~ site + (1 | village), o.m_20_r_coded_dat) %>% summary() Random
I have a dataframe that looks something like this: df <- data.frame(gvkey = c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6), date = c(01,02,03,01,02,03,01,02,03,01,0
I am currently preparing data to conduct a second order and third order habitat selection analysis. For the second-order (use/available), I am looking at the me
I have a large data frame in a panel structure (201720 rows; 3 columns) which looks as follows: Name <- c("A", "A", "A", "B", "B", "B") Inception <- c(as
I have a dataframe that contains NA values, and I want to remove some rows that have an NA (i.e., not complete cases). However, I only want to remove rows at th
Is there any way to remove columns from a dataframe that has LESS NA-values than for instance 200? So instead of df.dropna(threshold = 200) we want the opposite
I'm trying to modify a function to print NA when the function prints a warning message. I've tried using a return(NA) modifier, which you'll see in the functio
I have a data frame loaded from an Excel csv. One columns has many "NULL". This is what is showing up when looking at the data in RStudio. When I filter in the
I'd like to convert all the NAs in my very large data set to blank values "" I believe the issue that I have is that some columns are string, some are numeric,
for (i in 1:nrow(survey_clean)) { for(j in 1:ncol(survey_clean)) { survey_clean$invalid_answers[i] <- sum(survey_clean$old_col == survey_clean$ol
I am trying to create a variable using ifelse, and would like the column to be 0 when the condition is not true, but they are showing up as NA. Any tips? df$z &
I searched for an answer to how to exchange NAs with the mean of the previous and next values in a DataFrame for specifically one column. But I didn't find an a
I have one quest (pretty short). I shoud recode variebles with function(). I tried some, but it doesn't work still. It should work with this: recode.numeric(x =
I am trying to get predictions of a multiple variables model, its eplt, its made of 7 scores and one final exam score moy_exam2, I want to predict the later usi
penguins %>% map(~replace_na(list(.=0))) Why the code above didnt work to replace na in the dataset penguins? The result is below # A tibble: 8 x 1 .
Is there any way to replace all the "-95" that can possibly exist in a dataframe with NA across all the columns?
I have a problem where I have to predict the sales of 4000 products in 3 months for a certain store. Within the 4000 time series I have many null values and esp
I made a prediction model for land use change using the lulcc package in R. Prediction was done using glm. When I did the glm.pred (the last line), there was an
I have the following data stored as zoo object: A B C 2017-05-31 NA NA 3.1 2017-06-30 2.5 2.4 3.2 2017-07-