Displaying 20 results from an estimated 900 matches similar to: "Recursive solution with for()"
2007 Dec 28
1
FYI: Package installation problem with windows
Hello,
maybe this info is helpful for someone else, at least it is a reminder
for me if the problem should reoccur:
The last hours R drove me nuts because it wouldn't install new packages,
or more irritating still: It would chose randomly which packages to
install when given a list ("unable to move temporary installation" ).
The solution was to turn of the indexation of
2007 Jul 26
1
Download multiple stock quotes in a loop
Hi all,
this should be a simple question, but I haven't been able to do it
right. I am trying to download multiple stock quotes in a loop, so that
every timeseries is safed with the symbol of the stock. Can anybody help
me out? Here's the code:
require(tseries)
startd <- "2000-06-01"
stocks <- c("bmw.de", "vow.de", "dte.de")
for(stock in
2008 Apr 29
2
Problem installing packages
Hi,
when I try installing new packages (in this case DBI) I run into the
following problem:
Paket 'DBI' erfolgreich ausgepackt und MD5 Summen abgeglichen
Warnung: kann tempor?re Installation
'C:\Programme\R\R-2.7.0\library\file5f906952\DBI' nicht nach
'?
xlD?? $@\R\R-2.7.0\libra' verschieben
Has anybody any idea where these strange symbols come from?
Thanks in
2007 Jul 16
1
How to write a data.frame into n different csv-files
Hello,
I want to write a data.frame with 10 different entries x (by index y)? into ten different csv-files.
In every output file should be one of the ten numbers of x.
I tried this one, but I can't write into ten different files, like test1.csv to test10.csv:
x <- rnorm(10)
y <- c(1:10)
z <- data.frame(y,x)
n <- nrow(z)
for (i in 1:n) write.csv(z$x[i],
2009 Jan 22
0
hvm phy-disc doesnt boot (file-disc does) (debian dom0, SLES domU)
Hi,
we have a debian etch system running here and it works fine for hvms (winxp)
and paras (debian etchs).
Today i tried to do a SLES10SP2 setup as hvm (in the future it should run as
para). I used this config:
---------------
xenserver:/etc/xen# cat gp2backuptest.cfg
kernel = ''/usr/lib/xen-default/boot/hvmloader''
builder = ''hvm''
2006 Jun 08
1
panel.abline and xyplot
Dear All,
I am wondering on how to use the abline.xyplot with xyplot such that I will have different vertical lines for each panel. More sepcifically, suppose that the xyplot generates 4 panels defined by the combination of two binary variables: X_1 and X_2. i.e.
xyplot(Y ~ Z | X_1*X_2, data = df)
I want something like:
abline(v = 5) if X_1=0 and X_2 = 0
abline(v =
2009 Jun 11
2
Optimization Question
Hi All
Apologies if this is not the correct list for this question.
The Rglpk package offers the following example in its documentation
library(Rglpk)
## Simple mixed integer linear program.
## maximize: 3 x_1 + 1 x_2 + 3 x_3
## subject to: -1 x_1 + 2 x_2 + x_3 <= 4
## 4 x_2 - 3 x_3 <= 2
## x_1 - 3 x_2 + 2 x_3 <= 3
## x_1, x_3 are non-negative integers
## x_2 is a non-negative real
2008 Aug 04
2
Multivariate Regression with Weights
Hi all,
I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case.
y_1~x_1+x_2
y_2~x_1+x_2
var(y_1)=x_1*sigma_1^2
var(y_2)=x_2*sigma_2^2
cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2
How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)??
2003 Feb 19
4
fitting a curve according to a custom loss function
Dear R-Users,
I need to find a smooth function f() and coefficients a_i that give the best
fit to
y ~ a_0 + a_1*f(x_1) + a_2*f(x_2)
Note that it is the same non-linear transformation f() that is applied to
both x_1 and x_2.
So my first question is how can I do it in R?
A more general question is this: suppose I have a utility function U(a_i,
f()), where f() is say a spline. Is there a general
2009 Dec 04
2
Solve linear program without objective function
Dear R-users,
i try to solve to following linear programm in R
0 * x_1 + 2/3 * x_2 + 1/3 * x_3 + 1/3 * x_4 = 0.3
x_1 + x_2 + x_3 + x_4 = 1
x_1, x_2, x_3, x_4 > 0,
x_1, x_2, x_3, x_4 < 1
as you can see i have no objective function here besides that i use the
following code.
library(lpSolve)
f.obj<-c(1,1,1,1)
f.con<-matrix(c(0,2/3,1/3,1/3,
1,1,1,1,
2004 May 21
2
Help with Plotting Function
Dear List:
I cannot seem to find a way to plot my data correctly. I have a small data frame with 6 total variables (x_1 ... x_6).
I am trying to plot x_1 against x_2 and x_3.
I have tried
plot(x_2, x_1) #obviously works fine
plot(x_3, x_1, add=TRUE) # Does not work. I keep getting error messages.
I would also like to add ablines to this plot.
I have experimented with a number of other
2009 Oct 01
1
Help for 3D Plotting Data on 'Irregular' Grid
Dear All,
Here is what I am trying to achieve: I would like to plot some data in 3D.
Usually, one has a matrix of the kind
y_1(x_1) , y_1(x_2).....y_1(x_i)
y_2(x_1) , y_2(x_2).....y_2(x_i)
...........................................
y_n(x_1) , y_n(x_2)......y_n(x_i)
where e.g. y_2(x_1) is the value of y at time 2 at point x_1 (see that
the grid in x is the same for the y values at all times).
2009 Mar 13
1
print median and sd...
Hii,
Can anybody help me, I don't know how to print the "median". Below is my
code snipplet...
x
<-read.table(file="D:/Uni/Diplom/Diplom/Grafiken/R/BATMAN/Kabel/Batman1hop/Standardabweichung__output_30_1_Kabel(30m)_b.txt")
png(filename = "D:/Grafiken/R/Standardabweichung/Kopie.png", width = 640,
height = 480,pointsize = 12, bg = "white", res =
2007 Mar 29
3
Tail area of sum of Chi-square variables
Dear R experts,
I was wondering if there are any R functions that give the tail area
of a sum of chisquare distributions of the type:
a_1 X_1 + a_2 X_2
where a_1 and a_2 are constants and X_1 and X_2 are independent chi-square variables with different degrees of freedom.
Thanks,
Klaus
--
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
2003 Mar 07
24
Hello,
I am trying to use 'R' for K-means simulatio, could you please advise me how I can read my data into a two dimesional array? Or is there any method which directly reads the excell file? Please let me know asap.
Regards
Skanda Kallur
Cogito, Ergo Sum! Rene Descartes
2018 Nov 30
5
DMARC policies
Hi,
I have just started to get dovecot list messages which I had not been
receiving until today. How can I opt out (again)?
regards, Michal Szymanski
On Fri, Nov 30, 2018 at 10:42:22AM +0100, Per Jessen wrote:
> Aki Tuomi wrote:
> >On 30.11.2018 10.03, Per Jessen wrote:
> >
> >>Hi AKi
> >>
> >>I guess my address was re-subscribed then? I was subscribed
2007 Oct 18
8
centos 5 vs OpenSuse 10.3
Apart from religious grounds (!), is there any pros or cons why I should
choose one over the other for a new install of asterisk ?
Julian
2015 Aug 25
2
sieve_after seems to ignored ?
Michael Kliewe wrote:
> Hi Per,
>
> On 25.08.2015 11:40, Per Jessen wrote:
>> sieve and managesieve are both working fine, have been for years. Now
>> I want to add a sieve_after script:
>>
>> /etc/dovecot/conf.d/90-sieve.conf :
>>
>> plugin {
>> sieve = ~/.dovecot.sieve
>> sieve_dir = ~/sieve
>> sieve_before =
>>
2013 Mar 05
2
Issues when using interaction term with a lagged variable
Hi there!
Today I tried to estimate models using both plm and pgmm functions, with an
interaction between X1 and lag(X2, 1). And I notice two issues.
Let "Y=b_1 * X_1 + b_2 * X_2 + b_3 * X_1 * x_2 + e" be our model.
1) When using plm, I got different results when I coded the interaction
term with I(X1 * lag(X2, 1)) and when I just saved this multiplication X1 *
lag(X2, 1) in a
2010 Feb 22
7
Problem with Windows 7 and roaming profiles
Hello together,
we try to setup a samba domain controller with LDAP and roaming profiles for Win7-Clients.
Everything looks fine last Friday but today the clients did not longer save changes to the profiles. There is no error in samba log and also no in the windows log. If I delete a profile from a client it is loaded correctly at next logon, but the changes are not saved at logout.
Windows XP