Skip to content
Back to formatted view

Raw Message

Message-ID: <1687407730.1243315.1626306057329@mail.yahoo.com>
Date: 2021-07-14T23:40:57Z
From: Kai Yang
Subject: ls() pattern question

Hello List,
I have many data frames in environment.? I need to keep 3 data frames only, con DB2 and ora.?
I write the script to do this.?
rm(ls(pattern != c("(con|DB2|ora)")))


but it give me an error message:


Error in rm(ls(pattern != c("(con|DB2|ora)"))) :?
? ... must contain names or character strings

I think the pattern option doesn't support != ? and is it possible to fix this?
Thank you,
Kai



	[[alternative HTML version deleted]]