Question: I ran the apply function on a data frame in order to extract the positions of all cells with a value >-1. However, in my results I have a different number of cells in each column and R will not allow me to convert the results into a data frame because of this. 

Sample of my original data frame (Actual has 500+ columns):

```
Slopes<-data.frame(B1=5:495,B2=-100:390, B3=10:500,B4=-200:290)
row.names(Slopes)<-seq(0.01, 4.91, 0.01)

```

This is the function I ran over the vectors:

```
Z<-apply(Slopes, 2, function(x) which(x>-1))

```

How can I fill in the missing cells with "NA" so that I can convert these results into a data frame?

Also I just had to add this edit because now that I have successfully made the data frame, I have found that R returned the row numbers rather than the row names. Any alterations I can make to my apply code which would return the row names instead?

Answer: 
Try:

**View -> Tool Windows -> Project** OR the shortcut is **alt+1**.

If that's not working try:

**Window -> Restore Default Layout** OR the shortcut is **shift+F12**.

Also, check that Studio is up to date:

**Help -> Check for update...**
For me, it happened when I used Kotlin KTS for Gradle files, but created a java library module for this project. After trying to reimport project I got an error: 

> 
> New Gradle Sync is not supported due to containing buildSrc module
> 
> 
> 

**Solution**:  

Migrate added module to kts  

Remove created by Wizard `settings.gradle`, if you already use `settings.gradle.kts`  

Reimport project  

**File** -> Close project  

**Android Studio**: import project  

Show it your current project location