similar to: creating vector os zeros for simulations (beginner's question)

Displaying 20 results from an estimated 1000 matches similar to: "creating vector os zeros for simulations (beginner's question)"

2011 Oct 26
1
help with means using tail()
Hi all,   I have 5 series  (5 ts objects: rp, igpm, ereal, jurosreal, crescpib), and want to create a vector with the means of the last values of each variable. What I did was this:   mrp1<-mean(tail(rp,9)) migpm1<-mean(tail(igpm,9)) mereal1<-mean(tail(ereal,9)) mjr1<-mean(tail(jurosreal,9)) mcp1<-mean(tail(crescpib,9)) means=rbind(mrp1,migpm1,mereal1,mjr1,mcp1)   They are monthly
2011 Oct 18
0
how to use VARselect with missing values - beginner's question
Dear R helpers,   I have a ts object, dadosvar, and want to run a VAR. These are my data:   > dadosvar[1:15,]          dl    rp        igpm   ereal crescpib jurosreal  [1,] 32.31    NA 39.07  419.59       NA   7025.95  [2,] 32.00    NA 40.78  596.57       NA  13401.25  [3,] 32.70    NA 45.71  867.63       NA   7738.64  [4,] 33.22    NA 40.91 1261.36       NA  15669.95  [5,] 33.58    NA 42.58
2002 Oct 26
2
Fortran
Hello everybody, Could someone please send me a very simple example using Fortran from R? Say pass a value to an executable and get the result in R. Actually it seems it may be possible to call an *.f file ?? or I am wrong again? The manual is very terse on the subject. Thank you very much Stephen Elijah -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help
2011 Oct 17
2
Beginner's question about plotting variables in a time series object with the date on the x axis
Dear R helpers,   I am a beginner at R so please be gentle :) I have already read manuals and FAQs, with no help. I have a monthly time series data on public debt with 40 variables, it starts on January 1994 and ends on June 2011. I am loading the data into R using read.csv and the data looks ok when I do edit(dados): > dados<-read.csv("dadosR3.csv", header=T) then I tried making
2006 Jul 27
2
Vector extracted from a matrix. How can I specify dimensions in as.matrix?
Transpose vector extracted from a matrix Hello, I am doing a recursive analysis that uses every line (vector) of a matrix in a loop. In the model, I need to transpose those vectors that are extracted from a matrix. Using simple vectors (no matrix involved) the transpose function works fine: simplevector <-matrix(1:3,3,1) tsimplevector <-t(simplevector) #transposed dim(simplevector)
2004 Dec 07
4
Importing vector graphics into R
Dear R users, I know of the possibility to import bitmaps via the nice pixmap library. But if you later on create a PDF it is somewhat disappointing to have such graphics bitmapped. Is there a trick (via maps?) to import a vector graphic and have them plotted onto a graph? My searching attempts in the searchable r-help archive did not seem to result in anything useful... Cheers, hinrich
2013 May 16
2
A function that can modify an object? Or at least shows principles how to modify an object?
Hi, If I have an R object UUU, where the second element is U2, based on "g" column of my.table my.table of UUU is: mmm ggg gindex map Info aaa123 U1 1 1 1 aaa124 U1 1 2 1 bbb1378 U2 2 1 1 bbb8888 U2 2 2 0 bbb1389 U2 2 3
2007 Mar 27
7
Replacement in an expression - can't use parse()
Dear all, Suppose I have a very long expression e. Lets assume, for simplicity, that it is e = expression(u1+u2+u3) Now I wish to replace u2 with x and u3 with 1. I.e. the 'new' expression, after replacement, should be: > e expression(u1+x+1) My question is how to do the replacement? I have tried using: > e = parse(text=gsub("u2","x",e)) > e =
2005 May 24
4
Table Help
Reply to sender Reply to all Reply to folder Forward Move/Copy Delete Read previous item Read next item Get help information on the current window From: McMurtry, Benjamin G. To: 'r-help-request at stat.math.ethz.ch' Cc: Subject: Table Help Sent: 5/24/2005 4:33 PM Importance: Normal I have a very large table that I want to add some of the certain rows. The table is
2006 Nov 21
2
Symbolic derivation using D in package stats - how do I properly convert the returned call into a character string?
Dear all, I am using the function 'D' in the 'stats' package to perform symbolic derivation. This works very well and it is much faster than e.g. Mathematica (at least for my purposes). First, I would like to thank the development team for this excellent function. However, I run into trouble in some cases, particularly when I am to do some operations on long expressions
2011 Mar 29
5
Integration with variable bounds
If this is posted elsewhere I cannot find it. I need to perform multiple integration where some of the variables are in the bounds of the other variables. I was trying to use R2Cuba function but cannot set the upper and lower bounds. My code so far is : int <- function(y){ u2 = y[1] z2 = y[2] u1 =y[3] z1 = y[4] ff <- u1*(z1-u1)*u2*(z2-u2)*exp(-0.027*(12-z2)) return(ff) }
2009 Feb 05
1
optimal control, maximization with several variables?
Dear all, I would like to solve the following problem, which can be done with optimal control theory or dynamic programming: max(x,y) a*u1+b*u2+c*f1(u2) s.t. 0<u1<x, 0<u2<f2(x,u2), x'=f3(u1,u2,x) which can be rewritten if optimal control theory should be applied as H=a*u1+b*u2+c*f1(u2)+lambda*(x') s.t. 0<u1<x, 0<u2<f2(x,u2) The maximum principle
2009 Nov 23
18
OpenSuSE 11.2 bug, dom0-cpus limit causes xenwatch_cb running 100% and xm command freeze and xend dead
Hi all, I have upgraded a test machine from OpenSuSE 11.1 to 11.2. I have found following bug: the server is a 2x quadcore intel box also 2x4=8cpu If you limit the dom0 cpu with dom0-cpus= [1-7]: - [xenwatch_cb] is running 100% cpu and makes var log entry every 65 sec BUG: soft lockup - CPU#X stuck for 61s! - xm commands not work - xend is dead if set dom0-cpus to 0 or 8: - everything looks
2012 Dec 06
1
Anomalous outputs from rbeta when using two different random number seeds
Hi, in the code below, I am drawing 1000 samples from two beta distributions, each time using the same random number seed. Using set.seed(80) produces results I expect, in that the differences between the distributions are very small. Using set.seed(20) produces results I can't make sense of. Around half of the time, it behaves as with set.seed(80), but around half of the time, it behaves
2011 Sep 11
3
(no subject)
Dear all, Can anyone take a look at my program below? There are two functions: f1 (lambda,z,p1) and f2(p1,cl, cu). I fixed p1=0.15 for both functions. For any fixed value of lambda (between 0.01 and 0.99), I solve f1(p1=0.15, lambda=lambda, z)=0 for the corresponding cl and cu values. Then I plug the calculated cl and cu back into the function f2. Eventually, I want to find the lambda value
2003 Nov 07
13
File Locking
Hi, I'm running smbd 2.2.8. I'm a little green when it comes to file locking with samba. I have two users that access a single data file on a FreeBSD box. It's a moneydance data file and obviously it gets messed-up if two users are writing to it at the same time. Is there a way with samba to stop a second instance of the file from being opened, something like a "File In
2020 Apr 29
1
grid 4.0 generates wrong results when adding two complex units by sum()
Hi, In grid 4.0, adding two complex units by `sum()` seems to give wrong results. In the following example, `u1 + u2` gives the correct result, but `sum(u1, u2)` also `sum(unit.c(u1, u2))` give the wrong results. ``` library(grid) u1 = 0.4*sum(unit(1, "inch"), unit(1, "mm")) u2 = 0.1*sum(unit(1, "inch"), unit(1, "mm")) u1 # [1] 0.4*sum(1inches, 1mm)
2018 Jan 15
1
"linkfile not having link" occurrs sometimes after renaming
There are two users u1 & u2 in the cluster. Some files are created by u1, and they are read only for u2. Of course u2 can read these files. Later these files are renamed by u1. Then I switch to the user u2. I find that u2 can't list or access the renamed files. I see these errors in log: [2018-01-15 17:35:05.133711] I [MSGID: 109045] [dht-common.c:2393:dht_lookup_cbk] 25-data-dht:
2018 Mar 11
4
subsetting comparison problem
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4...... CN R1 0 1 0 1 R2 1 0 1 1 R3
2016 Dec 07
4
You have not permission to view content of this location
OS: CentosOS 7 I have installed samba + openldap + smbldap-tools + pam by: yum --enablerepo=extras install -y epel-release yum install -y smbldap-tools yum install -y samba openldap openldap-clients openldap-servers migrationtools yum install -y nss-pam* I know that smbldap-tools is a dead project, but I'm interested in it and would like research on it. I create users and