I am trying to combine rows of data.
ID. School. Test1. Test2. Test3.
123 abc pass NA fail
123 abc NA fail NA
How do I combine this into 1 row and keep ...
I have code here that generates a random spatial distribution of points, returns a distance column between every point and an infected individual and uses a function to calculate the probability of ...
I've a data frame like this (but with much more rows):
individ_id date_time begin end
1: NOS_4214433 2017-11-22 09:01:49 2017-11-21 11:54:59 2017-11-22 09:07:27
When using mutate_at to change variables in my data to either character, numeric or factors, I have issues with the numeric ones:
f <- c('V1', 'V2')
c <- c('V3', 'V4')
n <- c(...
Thanks for all of the support so far. I'm making the move from SPSS to R. I have the following SPSS code. Are there ways in R to deal with NAs in the same way as SPSS?
I have dataframe with values Na, blank and others. I want to replace Na with noted (string value)
I want to transform from here to here without changing blank cell.
I already tried
I have some problems with NA value cause my dataset from excel is not same column number so It showed NA. It deleted all row containing NA value when make calculation Similarity Index function Psicalc ...
I am trying to visualize missing values (NA) in a data.frame containing the Hepatitis dataset and using the package VIM. I am trying to do that by using the function spineMiss:
I have this kind of data :
 NA NA NA NA 2 1 NA NA
I want R to detect if there is a series of at least x NA and replace these by another value.
For example if x=3 and the replacement ...
What I need is to transform NA's to 0 after a number appears in the timeserie. This is an example:
c1 <- c(1,NA,NA,NA,NA,1,2,NA,NA,NA,5,NA,NA)
c2 <- c(2,NA,NA,10,30,NA,NA,NA,NA,4,1,2,NA)
I want to create a column of predicted values from a multiple regression using the lm function and the predict function without the lm function deleting rows where data to construct the multiple ...
Here is my toy dataset
df <- tribble(
~x, ~y, ~z,
7, NA, 4,
8, 2, NA,
NA, NA, NA,
NA, 4, 6)
I want to get a dataframe with a number of NAs for each variable only between the ...
I am struggling with R since 2 days without finding any solution !
Here is my problem :
I have a list of symbols extracted from one data-frame : annotation$"SYMBOL"
I would like to bind it to ...
My apologies for a poorly formulated question. I am new to R and to programming and for posting questions.
I am working with panel data. I have two context varying variables: cat (category that ...
I have a dataframe include 1,2 and bunch of NAs
I would like to compare these columns and save the results in a new column (let's say F) so that:
if in each row all values are 1 then the new column ...