m**a 发帖数: 370 | 1 off?
Today, my computer's these two software did not work any more,
at first, I saw a messege said that Dr. Watson attcked my computer.
But I didn't find this virus, so I restart it again,
it is said: File name warning
There is a file or folder on your computer called"c:\program" which
could cause certain applications to not function correctly, renaming it to
"C:\program1" would solve this problem. Wwould you like to rename it now?
I choose ignore, then
Both Norton antivirus 2003 and firewa |
|
c*******o 发帖数: 1722 | 2 【 以下文字转载自 Linux 讨论区 】
发信人: cocojumbo (Nick), 信区: Linux
标 题: ftp 问题
发信站: BBS 未名空间站 (Tue Jul 1 10:29:20 2008), 转信
if i have lists of files/path in a file, how do i download
all of them once and rename them?
for example, in FileName.txt, i have
filepath1/file1.htm
filepath2/file2.htm
.................
filepath1000/file1000.htm
i want to download all 1000 files in FileName.txt. how should
i do this? i also want to rename each file too.
thanks. |
|
S*********g 发帖数: 5298 | 3 History at a glance
The Illinois Industrial University Established 1867
Opened March 2, 1868
University of Illinois Renamed 1885
University of Illinois at Urbana-Champaign Renamed 1982 |
|
l****g 发帖数: 304 | 4 I want to convert the numeric variable CC to Character CC, then change the
value of cc from "1" to "case", "2" to "control". Thanks!
74 data exposure11;
75 set exposure1;
76 rename id=study_id;
77 newcc= put(cc,8.);
78 drop cc;
79 rename newcc=cc;
80 if cc="1" then cc="case";
81 if cc="2" then cc="control";
82 run;
NOTE: Character values have been converted to numeric values at the places
given by:
(Line):(Column).
|
|
A*********u 发帖数: 8976 | 5 1 jcode was renamed
2 $,.都要算
3 level = 2 or 3
等价于
(levle = 2) or 3
since 3 is forever true, level = 2 or 3 is forever true
should be
level = 2 or level =3
or
level in (2,3)
下周就考,还有以下三个问题不明白
第一道是
62. The following SAS program is submitted:
data work.company;
set work.dept1(keep = jobcode)
work.dept2(rename = (jcode = jobcode));
run;
Which one of the following is the result?
A. The variable JCODE is written to the output data set.
B. The variable JOBCODE is written to the output data set.
C. Neit |
|
c*******o 发帖数: 8869 | 6 来自主题: Statistics版 - SAS问题 data a;
infile cards dlm=',';
input a b;
cards;
1,4
3,3
2,
4,
;
run;
data b;
set a(in=aa rename=(a=var1)) a(in=bb rename=(b=var1));
if aa then var2='a';
else var2='b';
if var1;
keep var1 var2;
run; |
|
s******r 发帖数: 1524 | 7 proc sql;
select distinct compress(name||'='||name||'_v') into :M_Var_list separate by
' ' from
dictionary.columns
where libname='WORK' and memname='TEST';
%put &M_Var_list;
proc datasets lib=work;modify test;rename &M_Var_list;run;quit;
If your variable name is too long, probably you should need use %do to
rename varaible one by one.
加个v?该 |
|
s*****n 发帖数: 2174 | 8 同样一个任务, SAS有SAS的方式, R有R的方式. 用任何一个东西的构架去衡量另一个东
西, 都是没有意义的. 你这些天来问的问题, 绝大都是这种情况. 我本打算都不再回答
你的问题了, 不过既然你希望能双修, 还是希望你能抛开SAS思想来考虑问题的本身.
问题1:
你说的rename, 无非是在不复制object本身的情况下,
给object换个名字. R里面完全可以这样, 没什么可难的.
A <- matrix(0, ncol=10000, nrow=10000) ## a big object
B <- A ## B points to the same memory location as A
rm(A) ## Remove the pointer of A.
R和Splus里面的绝大多数object, 再赋值给另一个object的时候, 都并不复制, 只是建
立一个pointer. 除非你后来更改value. 在这个角度讲, 用不用package无所谓. SAS里
面的rename statement, 无非也是这么操作的, 只是给你包装成一 |
|
y****1 发帖数: 400 | 9 Yeah the problems are:
1. There is no way to check whether the SQL procedure changed my
observation sequence
2. I have close to 7,000 variables so it is impossible to rename them
all...
rename |
|
t*****l 发帖数: 11 | 10 Thank you, I tried, but it doesn't work. I saw what you mention about the
short-cut in the rename statement too, but seemingly not for calculation in
Proc Sql.
proc sql;
create table Baseline_A_1 as
select subject_id,
a1 as base_a1,
/* .. etc. .. , */
a10 as base_a10
from Scores
where visit=1;
create table baseline_A_2 as
select *
from Scores(rename=(a1-a10=base_a1-base_a10) drop=b:)
where visit=1;
quit; |
|
y****n 发帖数: 46 | 11 data newc(rename=(value=cvalue)) newn(rename=(value=nvalue)) ;
input value $ @@;
if ANYALPHA(value) ne 0 then output newc;
else output newn;
cards;
a b c d e
7 3 4 6 9
f g h i j
10 3 23 4 6
;
run;
data new;
merge newc newn;
run; |
|
o******6 发帖数: 538 | 12 ☆─────────────────────────────────────☆
ultrabo (ultrabo) 于 (Mon Mar 2 02:36:21 2009) 提到:
1 the following SAS program is submitted: data sasuser.history set
sasuser.history(keep=State x y rename=(State=St));total=sum(x,y) run; The
SAS data set SASUSER.HISTORY has an index on the variable STATE. which
describes the results of submitting the SAS program:
A the index on STATE is deleted.
为啥不是C: the index on STATE is recreated as an index on ST.
STATE 作为一个simple index, rename后不是associated inde |
|
R*********i 发帖数: 7643 | 13 Why it has to be sql? :-)
Assuming the variable rxdate is a numeric SAS date variable:
proc sql;
select coalesce(a.oldid1,b.oldid2) as id,
min(a.rxdate) as adate format=date9.,
min(b.rxdate) as sdate format=date9.,
(calculated adate>.) as ATORVASTATIN,
(calculated sdate>.) as SIMVASTATIN,
(.
from test(rename=(id=oldid1) where=(drugdesc='ATORVASTATIN')) a full
join
test(rename=(id=oldi... 阅读全帖 |
|
D**0 发帖数: 195 | 14 总是被这类的题弄晕。请大侠解释一下下面这些题。能解释几道都可以。多谢!
Item 6 of 63 Mark item for review
The table WORK.PILOTS contains the following data:
WORK.PILOTS
Id Name Jobcode Salary
--- ------ ------- ------
001 Albert PT1 50000
002 Brenda PT1 70000
003 Carl PT1 60000
004 Donna PT2 80000
005 Edward PT2 90000
006 Flora PT3 100000
The data set was summarized to include average
salary based on jobcode:
Jobcode Salary ... 阅读全帖 |
|
P****D 发帖数: 11146 | 15 Why do you want to do that?
I have done something similar before using macros. Don't know if my approach
is the easiest.
First use PROC CONTENTS to export all the variable names into a dataset, so
all these variable names are values of a string variable. Then add "_A" to
these values (Google if you don't know how to manipulate string variables).
Then use loop to generate a string macro variable whose CONTENT looks like
this "rename x = x_A; rename y=y_A;". Then you can execute that macro
variabl... 阅读全帖 |
|
s**f 发帖数: 365 | 16 Thank you for the suggestion!
I have a baseline survey and a followup survey. They have identical
variables. I would like to merge the two dataset and do some analysis. So I
am thinking renaming the variables. For example, variable OC3 in the 1st and
2nd survey will be renamed to OC3_A and OC3_B, respectively.
Is there a better way to approach this problem?
approach
so
. |
|
d**********r 发帖数: 24123 | 17 如果所有文件的变量个数都一样,那么你就写一个Macro rename 所有的 f1 f2 f3 f4
就好了。
实际上这样有个好处,就是所有的变量都会已text的方式读入。
如果文件的变量个数不一样,那就比较麻烦了,要写比较复杂的macro来读入第一行,存入Macro variables,然后再rename相应的variables。
或者你如果懂VBA的话,可以用DDE
f4 |
|
o****o 发帖数: 8077 | 18 why do u have to transpose the data twice? you can simply do:
data test3;
merge test(where=(group='A') rename=(X=A))
test(where=(group='B') rename=(X=B))
;
run; |
|
h********o 发帖数: 103 | 19 Try this:
============================
DATA TEST;
INPUT GROUP $ ID $;
CARDS;
1 IND1
1 IND2
2 IND3
2 IND4
3 IND5
3 IND6
;
PROC SORT DATA = ONE;
BY GROUP;
RUN;
DATA ONE(RENAME = (ID = ID1))
TWO(RENAME = (ID = ID2)) ;
SET TEST;
BY GROUP;
IF FIRST.GROUP THEN OUTPUT ONE;
IF LAST.GROUP THEN OUTPUT TWO;
RUN;
DATA FINAL;
MERGE ONE TWO;
BY GROUP;
RUN; |
|
S********a 发帖数: 359 | 20 问个SAS 日期时间转换的问题
一个日期变量 DATE,其value是01-Jan-2010这种形式,并且是字符型。一个时间变量TIME,其value是23:00,即小时:分钟,也是字符型的。我的问题是,我想把它们变成SAS数值型,有什么function可以用吗?
DATA TEST ;
SET A;
DATE=SUBSTR(DATETIME, 1, 11);
TIME=SUBSTR(DATETIME, 13, 5);
DAY = INPUT(SCAN(DATE, 1, "-"),2.);
MONTH = INPUT(SCAN(DATE, 2, "-"),$3.);
YEAR = INPUT(SCAN(DATE, 3, "-"),4.);
IF MONTH="Jan" then month1=1;
else if month="Feb" then month1=2;
else if month="Mar" then month1=3;
else if month="Apr" then month1=4;
else if month="May" then month1=5;
else i... 阅读全帖 |
|
C**********o 发帖数: 658 | 21 Case:
I have 107 variables to be renamed. Can I do it in this way (SAS) --
proc select xxx,xxx,xxx, ...., xxx
as xxxnew1,xxxxnew2,xxxnew3,....,xxxnew107
?
Or do I have to rename them one by one, such as
Proc select xxx as xxxnew11, xxx as xxxnew2,... ?? |
|
e*******e 发帖数: 75 | 22 Hi,
I am wondering who knows how to remove all the underscore in the variable
name? I have a data set with more than 200 variables and most of them have
more than one underscores. Is there any way to automatically rename all the
variables (removing the underscores in all of the variables in the data set)
instead of rename them one by one?
Many thanks! |
|
k*******a 发帖数: 772 | 23 不好意思,那个好像也不行,不过你可以先 reshape data比如
data a;
do i=1 to 8;
x=1; y=1;output;
end;
run;
data b(keep=var z);
set a(rename=(x=z) in=inx) a(rename=(y=z) in=iny);
if inx then var='x';
else if iny then var='y';
run;
proc means data=b noprint;
by var;
var z;
output out=c(drop=_freq_ _type_) n=n nmiss=nmiss min=min max=max;
run; |
|
s*******2 发帖数: 499 | 24 59.The SAS data set WORK.TEST has an index on the variable Id and the
following SAS program is submitted.
data WORK.TEST;
set WORK.TEST (keep=Id Var_1 Var_2 rename=(Id=Id_Code));
Total=sum(Var_1, Var_2);
run;
Which describes the result of submitting the SAS program?
A. The index on Id is deleted.
B. The index on Id is updated as an index on Id_Code.
C. The index on Id is deleted and an index on Id_Code is created.
D. The index on Id is recreated as an index on Id_Code.
参考答案选A. 为什么呢?SAS辅导材料上说rena... 阅读全帖 |
|
v********9 发帖数: 35 | 25 merge test(rename=(v1=Var1) firstobs=1 obs=3)
test(rename=(v1=Var2) firstobs=4 obs=6) ; |
|
j******o 发帖数: 127 | 26 data c;
if _n_=1 then do;
set b (rename=(nu=nu1 ran=ran1) firstobs=1 obs=1);
set b (rename=(nu=nu2 ran=ran2) firstobs=2 obs=2);
end;
set a;
run; |
|
d******9 发帖数: 404 | 27 If you do NOT have so many variables, you can rename the variables manually,
the below MACRO will work.
Please send me your BAOZI, thank you.
-------------------------------------------------------------
libname A 'your physical path';
****Use SAS MACRO to read in external CSV files from storage library.****;
filename Raw 'your physical path';
data AAA (drop=RC);
length Memname In_Name Out_Name $30;
Did=dopen("Raw");
if did> 0 then do;
Num=dnum(did);
do J=1 to Num;
Memname=dread(did, J);
In_Na... 阅读全帖 |
|
g**u 发帖数: 205 | 28 楼上那个更好。
我这个比较直白+低级。
data a;
input x;
cards;
1
2
3
;
run;
data b;
input u;
cards;
4
5
6
;
run;
data c;
input r;
cards;
7
8
9
;
run;
data d;
set b;
rename u=x;
run;
data e;
set c;
rename r=x;
run;
data y;
set a d e;
run; |
|
l****u 发帖数: 529 | 29 data two;
set one(rename=(time=atime id=aid date=adate)) nobs=n;
do i=_N_ to n;
set one(rename=(time=btime id=bid date=bdate)) point=i;
if aid=bid and adate=bdate and atime<=btime<=atime+60;
output;
end;
proc sort; by aid adate atime;
run;
data three;
set two;
by aid adate atime;
retain cnt;
if first.atime then cnt=0;
cnt+1;
if last.atime and cnt>=10 then do;
indicator='robot';
keep aid adate indicator ;
output;
end;
run; |
|
g**u 发帖数: 205 | 30 如果追求新data必须variable名字都一样。
data a;
input id group nlist;
cards;
1 0 23
1 1 31
2 0 5
3 0 41
3 1 22
3 2 19
3 3 9
;
data b(rename=(nlist=temp));
set a;
run;
data c;
set b;
by id;
if first.id then tot=temp;
else tot+temp;
rename tot=nlist;
drop temp;
run;
不然只需要核心就够了。
data a;
input id group nlist;
cards;
1 0 23
1 1 31
2 0 5
3 0 41
3 1 22
3 2 19
3 3 9
;
data c;
set a;
by id;
if first.id then tot=nlist;
else tot+nlist;
drop nlist;
run; |
|
j******o 发帖数: 127 | 31 data have;
input index var1 $ var1_description $ var2 $ var2_description $;
datalines;
1 cd02 cd02_text cd05 cd05_text
2 cd05 cd05_text cd03 cd03_text
3 cd03 cd03_text cd04 cd04_text
4 cd10 cd10_text cd08 cd08_text
;
run;
data obtain;
set have(keep=index var1 var1_description rename=(var1=var var1_
description=description))
have(keep=index var2 var2_description rename=(var2=var var2_
description=description));
by inde... 阅读全帖 |
|
b******e 发帖数: 228 | 32 请教两个SAS ADV问题,包子答谢!
下面这道题网上给的答案是A,但是A里给sum(Expense)的 label=’COST’ ,与结果的
‘Cost’不一致。个人认为答案应该是D,在sum(Expense) as Cost之后,data sets
VISIT1和VISIT2的columns with common names, 用outer union corr可以overlay the
columns。如有错误,请指正,非常感谢!
26. Given the following SAS data sets:
WORK.VISIT1 WORK.VISIT2
Id Expense Id Cost
— ——- — —-
001 500 001 300
001 400 002 600
003 350
The following result set wa... 阅读全帖 |
|
y**3 发帖数: 267 | 33 thanks!! it worked
proc sql;
create table both(DROP=oldID) as
select coalesce(ONE.oldID,TWO.oldID) AS ID,
*
from one (RENAME=(ID=oldID)) full join two(RENAME=(ID=oldID))
on (one.oldid =two.oldid and one.month1=two.month2)
;
quit; |
|
o**********e 发帖数: 18403 | 34 500 Muslims renames the MLK day as Muslim Lobby Day
and protest in Washington capitol hill for Muslim causes.
I'll not comment on whether MLK day is good for renaming.
http://www.redmond-reporter.com/community/137204588.html
But when will there be a Chinese-American week with Chinese-
American Community Activism focus? |
|
w*******y 发帖数: 60932 | 35 Link:
https://www.mupromo.com/
- Parallels Desktop 6 - Run Windows on your Mac without rebooting
- Divvy ($14) - Create custom workspaces on your screen
- 1Password ($39) - Easily manage website logins/passwords
- MacUpdate Desktop ($10) - Keep your Mac software updated automatically
- DVD REmaster Pro 7 ($49) - Convert DVD movies to iPhone or Apple TV
- Mac DVDRipper 2 ($9) - Copy DVDs to your Mac
- Hands Off! ($24) - Monitor and control access to your network or disks
- App Tamer ($14) - Pause... 阅读全帖 |
|
OX 发帖数: 516 | 36 安装Debian过程中出现问题,运行./dockstar.debian-squeeze.sh后
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
mkswap: can't open '/dev/sda2': No such device or address
mkdir: cannot create directory '/tmp/debootstrap': File exists
Connecting to cdn.debian.net (128.30.2.36:80)
wget: server returned error: HTTP/1.1 404 Not Found
ar: can't open 'debootstrap.deb': No such file or directory
tar: can't open 'data.tar.gz': No such f... 阅读全帖 |
|
OX 发帖数: 516 | 37 安装Debian过程中出现问题,运行./dockstar.debian-squeeze.sh后
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
mkswap: can't open '/dev/sda2': No such device or address
mkdir: cannot create directory '/tmp/debootstrap': File exists
Connecting to cdn.debian.net (128.30.2.36:80)
wget: server returned error: HTTP/1.1 404 Not Found
ar: can't open 'debootstrap.deb': No such file or directory
tar: can't open 'data.tar.gz': No such f... 阅读全帖 |
|
|
|
p**********d 发帖数: 7918 | 40 http://www.nytimes.com/2011/04/04/world/asia/04museum.html?_r=1
April 3, 2011
At China’s New Museum, History Toes Party Line
By IAN JOHNSON
BEIJING — At the elaborately renovated National Museum of China in
Tiananmen Square, visitors interested in the recent history of the world’s
fastest rising power can gaze at the cowboy hat that Deng Xiaoping once wore
when he visited the United States, or admire the bullhorn that President Hu
Jintao used to exhort people to overcome hardship after the Sichu... 阅读全帖 |
|
c**i 发帖数: 6973 | 41 (1) Larry Goetz, Into the Bustle of China's Boom. New York Times, June 26,
2011 (in the Jobs page of the Sunday Business section).
http://www.nytimes.com/2011/06/26
/jobs/26pre.html?_r=1&scp=1&sq=nbbj&st=cse
Quote:
"I was there for the 2008 Olympics in Beijing and Expo 2010 in Shanghai. The
Chinese literally rebuilt both cities for these events, which, as an
architect, I found fascinating. There is probably no better place for an
architect to practice currently than China.
"I’ve been home a year... 阅读全帖 |
|
c**i 发帖数: 6973 | 42 (1) 孙中山与支持辛亥革命的日本右派们. BBC Chinese, Oct 3, 2011.
http://www.bbc.co.uk/zhongwen/simp/world/2011/10/111003_xinhai_
Quote:
"少年孙中山在夏威夷读书期间遭白人欺辱产生的黄种人劣等感,奠定他的强烈民族意
识与日本明治维新后出现仇视欧美帝国殖民统治亚洲的'大亚洲主义'右翼势力有接点。
宫崎滔天是当时大亚洲主义中少数的自由民权运动者,犬养毅则是大亚洲主义政客。甲
午战争后,日本政府既担心中国报复,也不愿西欧列强乘清朝腐败瓜分中国,犬养建议
当时的外相大隈重信,利用缺乏活动资金的宫崎等自由民权运动者来观察中国的革命动
向。
Note (Japanese names in the note are written in Japanese Kanji):
(a) 小坂 梅吉 KOSAKA Umekichi
The report described him as 松竹楼的创业者. Actually it is 松本楼 Matsumoto
Ro
http://ja.wikipedia.o... 阅读全帖 |
|
c**i 发帖数: 6973 | 43 (1) Keith Bradsher, Offshore Oil Helps Brazil Lead Boom. New York Times, Oct
14, 2011.
http://www.nytimes.com/2011/10/11/business/energy-environment
/in-brazil-energy-finds-put-country-at-a-whole-new-power-level.html?scp=1&sq
=brazil%201954&st=cse
Quote:
"Petrobras’s huge offshore oil discoveries in recent years now enable its
leaders to contend that it could surpass Exxon Mobil * * * as the world’s
largest publicly-traded oil company.
"Argentina ranked third in the world, after China and the Un... 阅读全帖 |
|
j**8 发帖数: 88 | 44 介绍一个搞得过的:24岁来美,资产16亿美元(2006)。
Ming Hsieh (S: 谢明; T: 謝明; born 1955) is a billionaire American
entrepreneur and philanthropist and the founder of Cogent Systems in 1990.
According to Forbes magazine, his estimated net worth exceeds $1.6 billion,
ranking him the 198th richest person in America and 562nd among The World's
Richest People In 2006.
Born to Baoyan and Sun Hsieh, Ming Hsieh's family originated in Guangzhou (
Canton), he was raised in Shenyang, the capital city of Liaoning province in
Nor... 阅读全帖 |
|
d******a 发帖数: 32122 | 45 【 以下文字转载自 PDA 讨论区 】
发信人: weidong (伊拉克学习小组副组长), 信区: PDA
标 题: Re: 被SKYDRIVE震精了.
发信站: BBS 未名空间站 (Sun Mar 3 15:48:18 2013, 美东)
映射表你可以看看,
Due to the limitations of the supported zip file format, the following file(
s) had to be renamed.
Original File Name -> New File Name
1.电子书目录/文件索引.txt -> 1/File1.txt
婚恋。两性/B/性社会学.epub -> 2/B/File2.epub
婚恋。两性/B/魔鬼搭讪学 1.epub -> 2/B/File3.epub
婚恋。两性/B/男性保健.epub -> 2/B/File4.epub
婚恋。两性/B/魔鬼搭讪学.epub -> 2/B/File5.epub
婚恋。两性/B/把妹达人.epub -> 2/B/File6.epub
婚恋。两性/B/骄傲风趣... 阅读全帖 |
|
|
|
h*i 发帖数: 3446 | 48 《1434》
有人看了么?
前两页:
One thing that greatly puzzled me when writing 1421 was the
lack of curiosity among many professional historians.
After all, Christopher Columbus supposedly discovered
America in 1492. Yet eighteen years before he set sail, Columbus had a
map of the Americas, which he later acknowledged in his logs. Indeed,
even before his first voyage, Columbus signed a contract with the king
and queen of Spain that appointed him viceroy of the Americas. His
fellow ship’s captain Martín Alons... 阅读全帖 |
|
|
r*****y 发帖数: 53800 | 50 板鸭一直保持中立,自然不能算是战胜国。意大利政府于1945年7月正式对日本宣战,
自然是战胜国。
Italy's declaration of war on JapanAlthough Italy and Japan were part of the
Axis Powers, Japan reacted with shock and outrage to the news of the
surrender of Italy to the Allied forces in September 1943. Italian citizens
residing in Japan and in Manchukuo were swiftly rounded up and summarily
asked whether they were loyal to the King of Savoy, who dishonored their
country by surrendering to the enemy, or with the Duce and the newly created
"Repub... 阅读全帖 |
|