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
- Delete a column from a Pandas DataFrame
- How to deal with SettingWithCopyWarning in Pandas
- How to deal with SettingWithCopyWarning in Pandas
- Constructing pandas DataFrame from values in variables gives “ValueError: If using all scalar values, you must pass an index”
- 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
- Selecting multiple columns in a Pandas dataframe
- Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
- Get statistics for each group (such as count, mean, etc) using pandas GroupBy?
- Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
- Writing a pandas DataFrame to CSV file
- Adding new column to existing DataFrame in Python pandas
- How to change the order of DataFrame columns?
- How to change the order of DataFrame columns?
- Pandas DataFrame Groupby two columns and get counts
- How can I use the apply() function for a single column?
- How to show all columns’ names on a large pandas dataframe?
- How to groupby based on two columns in pandas?
- How to deal with SettingWithCopyWarning in Pandas
- Merging dataframes on index with pandas
- Counting the number of elements with the values of x in a vector
- Create a Pandas Dataframe by appending one row at a time
- 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()
- Non-numeric Argument to Binary Operator Error in R
- Convert Python dict into a dataframe
- Creating an empty Pandas DataFrame, then filling it?
- How do I select rows from a DataFrame based on column values?
- 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
- How do I get the row count of a Pandas DataFrame?
- Python pandas groupby aggregate on multiple columns, then pivot
- Convert pandas dataframe to NumPy array
- DataFrame constructor not properly called
- Convert pandas Series to DataFrame
- Error in ggplot.data.frame : Mapping should be created with aes or aes_string
- Error in file(file, “rt”) : invalid ‘description’ argument in complete.cases program
- SummarySE (Rmisc package) to produce a barplot with error bars (ggplot2)
- Editing legend (text) labels in ggplot
- Extract rows from R data frame based on factors (strings)
- Remove an entire column from a data.frame in R
- How to iterate over rows in a DataFrame in Pandas
- Pandas group-by and sum
- How do I get the row count of a Pandas DataFrame?
- Logistic Regression on factor: Error in eval(family$initialize) : y values must be 0 <= y <= 1
- How can a add a row to a data frame in R?
- ValueError: Length of values does not match length of index | Pandas DataFrame.unique()
- ‘DataFrame’ object has no attribute ‘sort’
- R – longer object length is not a multiple of shorter object length
- Error: attempt to use zero-length variable name
- ‘DataFrame’ object has no attribute ‘sort’
- Rename Pandas DataFrame Index
- pandas: filter rows of DataFrame with operator chaining
- ‘DataFrame’ object has no attribute ‘sort’
- Pandas, merging two dataframes on multiple columns, and multiplying result
- 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
- What is dtype(‘O’), in pandas?
- How to read a .xlsx file using the pandas Library in iPython?
- Get total of Pandas column
- What is dtype(‘O’), in pandas?
- How to check whether a pandas DataFrame is empty?
- Change column type in pandas
- ValueError: ‘object too deep for desired array’
- Error in x[j] : invalid subscript type ‘list’ while using subset in R
- Create empty data frame with column names by assigning a string vector?
- Shuffle DataFrame rows
- What does axis in pandas mean?
- How to take column-slices of dataframe in pandas
- 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
- Python: create a pandas data frame from a list
- Pandas – DataFrame object is not callable
- Convert a Pandas DataFrame to a dictionary
- How to remove outliers from a dataset
- Convert pandas data frame to series
- Create a Pandas Dataframe by appending one row at a time
- Insert a blank column in dataframe
- Normalize columns of pandas data frame
- Normalize columns of pandas data frame
- Replacing values from a column using a condition in R
- 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
- Dropping Multiple Columns from a data frame using Python
- Replace all particular values in a data frame