You can index RT
with is.na(ACC)
like this. This answer will work if RT and ACC have the same dimension.
#example data RT <-data.frame(matrix(1:25,ncol=5)) ACC <-data.frame(matrix(rep(1,25),ncol=5)) ACC[c(1,3,5),c(2,3,4)] <-NA #Put NA in RT where ACC is NA RT[is.na(ACC)] <-NA RT X1 X2 X3 X4 X5 1 1 NA NA NA 21 2 2 7 12 17 22 3 3 NA NA NA 23 4 4 9 14 19 24 5 5 NA NA NA 25
Related Posts:
- How to resolve TypeError: ‘No Numeric Data to Plot’, when numeric data exists in Python
- Sample random rows in dataframe
- How can I change the name of a data frame
- Convert data.frame column to a vector?
- Converting from a character to a numeric data frame
- R Hex to RGB converter
- how to sort pandas dataframe from one column
- Renaming column names in Pandas
- How to reset index in a pandas dataframe? [duplicate]
- how to reset index pandas dataframe after dropna() pandas dataframe
- How to deal with SettingWithCopyWarning in Pandas
- How to deal with SettingWithCopyWarning in Pandas
- How to iterate over rows in a DataFrame in Pandas
- How to iterate over rows in a DataFrame in Pandas
- Writing a pandas DataFrame to CSV file
- How to change the order of DataFrame columns?
- How to change the order of DataFrame columns?
- How can I use the apply() function for a single column?
- How to groupby based on two columns in pandas?
- Merging dataframes on index with pandas
- How to replace NaN values by Zeroes in a column of a Pandas Dataframe?
- ValueError: Length of values does not match length of index | Pandas DataFrame.unique()
- Convert Python dict into a dataframe
- How do I select rows from a DataFrame based on column values?
- Remove an entire column from a data.frame in R
- Pandas group-by and sum
- Python pandas groupby aggregate on multiple columns, then pivot
- Error in ggplot.data.frame : Mapping should be created with aes or aes_string
- SummarySE (Rmisc package) to produce a barplot with error bars (ggplot2)
- Remove an entire column from a data.frame in R
- Pandas group-by and sum
- Error: attempt to use zero-length variable name
- Rename Pandas DataFrame Index
- pandas: filter rows of DataFrame with operator chaining
- ‘DataFrame’ object has no attribute ‘sort’
- Convert DataFrame column type from string to datetime, dd/mm/yyyy format
- How can a add a row to a data frame in R?
- Get a list from Pandas DataFrame column headers
- How to read a .xlsx file using the pandas Library in iPython?
- Get total of Pandas column
- How to check whether a pandas DataFrame is empty?
- Change column type in pandas
- Create empty data frame with column names by assigning a string vector?
- What does axis in pandas mean?
- Combine two columns of text in pandas dataframe
- Python: pandas merge multiple dataframes
- How to count the NaN values in a column in pandas DataFrame
- Pandas – DataFrame object is not callable
- Convert pandas data frame to series
- Normalize columns of pandas data frame
- Normalize columns of pandas data frame
- Selecting/excluding sets of columns in pandas
- “non-numeric argument to binary operator” error in R
- How to filter Pandas dataframe using ‘in’ and ‘not in’ like in SQL
- How to apply a function to two columns of Pandas dataframe
- Convert data.frame columns from factors to characters
- OSError: Initializing from file failed on csv in Pandas
- How can I convert Json to data frame in R
- Insert a row to pandas dataframe
- Subtract two columns in dataframe
- How to check if a column exists in Pandas
- Pandas error “Can only use .str accessor with string values”
- Error in eval(expr, envir, enclos) : object not found
- How to split a data frame?
- scale_fill_discrete and scale_fill_manual – legend options confusion
- How do you specifically order ggplot2 x axis instead of alphabetical order?
- ‘Incomplete final line’ warning when trying to read a .csv file into R
- Rename specific column(s) in pandas
- Convert R code into Python code using rpy2
- Error: Invalid number of ‘breaks’ in R
- How to catch integer(0)?
- “no function to return from, jumping to top level”
- Coalesce values from 2 columns into a single column in a pandas dataframe
- r random forest error – type of predictors in new data do not match
- env=baseenv() in R
- Move column by name to front of table in pandas
- Gradient of n colors ranging from color 1 and color 2
- Deleting rows that are duplicated in one column based on the conditions of another column
- What is the difference between require() and library()?
- Replace all 0 values to NA
- R Sweave: NO TeX installation detected
- pandas comparison raises TypeError: cannot compare a dtyped [float64] array with a scalar of type [bool]
- How to convert a table to a data frame
- Pandas dataframe groupby plot
- ERROR: [on_request_read] connection reset by peer in R shiny
- Error in as.vector(x, mode) : cannot coerce type ‘closure’ to vector of type ‘any’
- Suppress output of a function
- Got continuous is not supported error in RandomForestRegressor
- r function unzip error 1 in extracting from zip file
- Colour points in a plot differently depending on a vector of values
- increase legend font size ggplot2
- How To Create Vector of Vector In R
- What is the meaning of the dollar sign “$” in R function()?
- Use of ~ (tilde) in R programming Language
- Error: x must be atomic for ‘sort.list’
- Transposing in dplyr
- Does the c command create a row vector or a column vector by default in R
- Convert list of dictionaries to a pandas DataFrame
- Error in summary.connection(connection) : invalid connection
- In R, dealing with Error: ggplot2 doesn’t know how to deal with data of class numeric