@Prateek123 wrote:
Hi everyone,
I am new to the field of data science and would need your help in executing the task. While working on a dataset, I observed that I had to perform operations only on some particular rows. Thus, I decided to make a dataframe and transfer all those rows in the new dataframe
I wanted to impute rows into a new dataframe based on the a condition. So, I initialised it as follows:
df<-NULL
Next, I applied the condition such that the row with Student_ID=7697727 gets transferred into the first row of df.
df[1]<-a[which(a$Student_ID==7697727),]
Error in df[1] <- a[which(a$Student_ID == 7697727), ] :
object of type 'closure' is not subsettablePlease suggest an alternate method to do this.
Posts: 1
Participants: 1