از پارسکدرز بیشترین بهره را ببرید و رویای کاری خود را زندگی کنید.
سه سال پیش منتشر شده
تعداد بازدید: 381
کد پروژه: 141933
شرح پروژه
سلام يک کد لازم در استاتا است براي دو موضوع ذيل
يکي در خصوص factorial
دومي براي ذخيره و جدا سازي اسامي در کد استانا که مي توان از از substr استفاده کرد
substr function!
Dabir: https://www.stata.com/manuals15/m-5substr.pdf
ماکروهاي مورد نياز
the factorial of a given macro! Do not
* forget that in a strict sense, the domain of factorial is the set of
* (positive) natural numbers.
* Write a piece of code that stores your or someone else's name in a macro, and
* then first outputs its first letter, then the second, up until the end of the
ساير اطلاعات اوليه و ...
Basic programming elements *
****************************
* Macro variables can store different values
* Local macros are cleared after execution
local i = 1
disp `i'
* Local macros can have string values
local s "And deep beneath the rolling waves"
disp "`s'"
disp `s'
* Values of global macros are stored after execution
global t "In labyrinths of coral caves"
disp "$t"
macro list
macro list t
* Concatenation of string with plus sign
local u = "$t" + "An echo of a distant time"
disp "`u'"
* Combining different types
local score = 100
disp "I will score `score'% on the test"
* Double quotes
local q `"Comes "willowing" across the sand"'
disp `"`q'"'
* Making calculations
local a = 5
local b = 6
disp `=`a' + `b''
disp "a + b = `=`a' + `b''"
* Values of a dataset can be accessed
sysuse auto
disp `=price[1]'
disp "`=make[2]'"
* The _N constant stores the number of observations
disp _N
disp `=price[_N - 1]'
****************************
* If clauses and loops *
****************************
* Simple if clauses
local a = 5
local b = 6
* Programming if is different than conditional if
if `a' > `b' {
disp "`a' > `b'"
}
else {
disp "`b' > `a'"
}
* Be careful with numericals stored as string
if "2" > "19" {
disp "Careful with strings!"
}
* More complex conditions
local a = 5
local b = 6
if (`a' != `b' & mod(`b', 2) == 0) {
disp 2 * `b'
}
* For loop for values
forvalues i = 1/5 {
disp `i'
}
* Different steps
forvalues i = 10(-2)0 {
disp `i'
}
* For loop for variables
foreach v of varlist _all {
disp "`v'"
disp "`=`v'[1]'"
}
* For loop for macros
local words "And everything is green and submarine"
foreach w of local words {
disp "`w'"
}
* Other types of loops
foreach i in 1 4 "apple orange" 132 car {
disp "`i'"
}
* name!
مهارت ها و تخصص های مورد نیاز
بودجه
5,000 تومان تا 100,000 تومان
مهلت برای انجام
1روز
وضعیت مناقصه
بسته
درباره کارفرما
عضویت سه سال پیش
قادر به انجام این پروژه هستید؟
مهلت ارسال پیشنهاد قیمت برای این پروژه تمام شده است
به رایگان یک حساب کاربری بسازید
مهارتها و تخصصهای خود را ثبت کنید، رزومه و نمونهکارهای خود را نشان دهید و سوابق کاری خود را شرح دهید.
به شیوهای که دوست دارید کار کنید
برای پروژههای دلخواه در زمان دلخواه پیشنهاد قیمت خود را ثبت کنید و به فرصتهای شغلی منحصر به فرد دسترسی پیدا کنید.
با اطمینان دستمزد دریافت کنید
از زمان شروع کار تا انتهای کار به امنیت مالی شما کمک خواهیم کرد. وجه پروژه را از ابتدای کار به امانت در سایت نگه خواهیم داشت تا تضمین شودکه بعد از تحویل کار دستمزد شما پرداخت خواهد شد.
میخواهید شروع به کار کنید؟
یک حساب کاربری بسازید
بهترین مشاغل فریلنسری را پیدا کنید
رشد شغلی شما به راحتی ایجاد یک حساب کاربری رایگان و یافتن کار (پروژه) متناسب با مهارتهای شما
است.
پیدا کردن کار (پروژه)
تماشای دمو روش کار