y******g 发帖数: 4 | 1 #include
#include
#include
#include
using namespace std;
struct Item {
int counter;
char c;
Item(): counter(0), c('\0') {};
Item(int counter_, char c_) : counter(counter_), c(c_) {};
Item(const Item &anotherItem): counter(anotherItem.counter), c(
anotherItem.c) {};
};
struct ItemCompare {
Item* prev;
ItemCompare(Item* prevItem): prev(prevItem) {};
bool operator() (const Item &item1, const Item &item2) {
... 阅读全帖 |
|
J**s 发帖数: 453 | 2 比如,我的dataset里面有很多variables
aabbbbCC ghhjjhCC jggettCC ghggghBB .......
只要某个variable是以CC结尾的,我就要删除这个variable
怎么做到呢?
谢谢!!! |
|
f*******e 发帖数: 51 | 3 use transpose
data old;
input aabbbbCC ghhjjhCC jggettCC ghggghBB ;
datalines;
1 2 3 4
4 3 2 1
;
run;
proc transpose data=old
out=new;
run;
data new1;
set new;
if substr(reverse(_name_),1,2)="CC" then output;
run;
proc transpose data=new1
out=new2 (drop=_name_);
run; |
|