Displaying 20 results from an estimated 30 matches for "output1".
Did you mean:
outputs
2010 Oct 21
4
data.frame query
...of my question, but I would be grateful for any
advice. Thanks
I'm trying to put the output from a for loop into a data frame, however I
have not been successful.
The steps I have taken are:
*R-code:*
>for (k in 1:(nt-1-n0) ){
> n<- n0-1+k
> lam=n/nt
> Q=x[n]
> output1<-data.frame(cbind(k,n,lam,Q))
> output1
> }
> output1
*R-Output *
k n lam Q
1 14 18 0.9 18
I would like the output in this format, but for all the values of k (i.e.
1-14 as opposed to just the last value)
I have also tried
*R-code:*
> nt=20
> n0=5
> x=c...
2007 Jun 19
1
A question about plots and lists in functions
...have a function I am sourcing into R that does some calculations to
generate a simulated dataset. I currently have a a list set up to store
the outputs from the function and a plot of one of them (a set of
ordered pairs) like this:
foo<-function(x,y,z){
## do some work here ##
list(x=x,y=y,z=z,output1=output1,output2=output2,
plot=plot(output1[,1],output1[,2],type=p));
}
The problem I am having is that when I do
>work<-foo(x,y,z)
>work
it will show the plot, but I would like to be able to repeatedly call it
like I can call the different plots in an lm without having to display
e...
2010 Dec 23
5
Writing a single output file
...= paste("output", i, ".csv", sep = ""), row.names = FALSE)
}
Depending on value of 'n', I get different output files.
Suppose n = 3, that means I am having three output csv files viz. 'output1.csv', 'output2.csv' and 'output3.csv'
output1.csv
date yield_rate
12/23/2010 5.25
12/22/2010 5.19
.................................
.................................
output2.csv
date yield_rate
12/23/2010 4.16
12/22/2010 ...
2008 Feb 13
4
rolling sum (like in Rmetrics package)
...Rmetrics package and the rollMean function and I
would like to do the same thing except Sum instead of Mean.) I imagine
someone has done this, I just can't find it anywhere.
Example:
x <- somevector #where x is 'n' entries long
#what I would like to do is:
x1 <- x[1:20]
output1 <- sum(x1)
x2 <- x[2:21]
output2 <- sum(x2)
x3 <- ...
ouput <- c(output1, output2, ...)
Thanks,
JV
--
View this message in context: http://www.nabble.com/rolling-sum-%28like-in-Rmetrics-package%29-tp15459848p15459848.html
Sent from the R help mailing list archive at Nabble.com.
2008 Mar 07
3
Error
Hello!
I need some help, because I don't know how this error means: Error:
variables ?Output1?, ?Output2?, ?Output3?, ?Output4?, ?Output5? were
specified with different types from the fit
Execution halted
Can you help me?
Thank You
2009 Dec 16
1
WinBUGS - R2WinBUGS problem
...ions*nthin, n.burnin = 0, DIC = F, debug = T, save.history=F)
which opens WinBUGS and executes the following log file:
display(log)
check(C:/Documents and Settings/sbadamakis/Desktop/model_4/model_4.txt)
model is syntactically correct
data(C:/Documents and Settings/sbadamakis/Desktop/model_4/output1/data.txt)
data loaded
compile(1)
model compiled
inits(1,C:/Documents and Settings/sbadamakis/Desktop/model_4/output1/inits1.txt)
model is initialized
gen.inits()
command #Bugs:gen.inits cannot be executed (is greyed out)
thin.updater(1)
update(0)
set(beta)
update(20)
coda(*,C:/Documents...
2007 Jun 27
1
Another loop avoidance question.
...l advantage here). The following does
exactly what I want (except for the loops). My aim is to find the
solution which minimises processing time.
cheers
Dave
## Basic paramters
k1=3
k2=2
n=10
m1 = matrix (1:(n*k1), nrow=n, ncol=k1)
m2 = matrix (1:(n*k2), nrow=n, ncol=k2)
## Approach 1: loop on k1
output1 = matrix(0,nrow=n,ncol=k2)
pt1 = proc.time(for (i in 1:k1) output1 = output1 + m1[,i]*m2)
## Approach 2: loop on k2
output2 = matrix(0,nrow=n,ncol=k2)
pt2 = proc.time(for (i in 1:k2) output2[,i] = rowSums( m1*m2[,i] ))
## Same result
sum(output1-output2)
--
David Pleydell
Laboratoire de Biologi...
2012 Oct 11
2
Repeating a series of commands
...),ifelse(b$Z=="U",sample(9:10,length(b$Z),replace=TRUE),"")))
b$Z<-as.numeric(b$Z)
This is basically just starting off with a new and partially random data set
every time that then goes through a bunch of other commands (not shown) and
ends with the following outputs saved.
Output1, Output2, Output3, Output4
where each of these is just a single number. My questions is:
1. How do I repeat the entire series of commands x number of times and save
each of the outputs into a structure like this:
Output1 Output2 Output3 Output4
Iteration 1
Itera...
2012 Dec 21
2
Can data.frame be saved as image?
Dear R forum
I have one stupid question, but I have no other solution to it in sight?
Suppose some R process creates graphs etc alongwith main output as data.frame e.g
output1 = data.frame(bands = c("A", "B", "C"), results = c(74, 108, 65))
I normally save this output as some csv file.
But I need to save this output as some image (I understand this is weird, but I need to find out some way to do so) e.g. for graph, I use 'png' as...
2008 May 25
11
Aerofly Prof deluxe
Have someone experience with the model-aircraft simulator
Aerofly Prof. deluxe?
Get someone them running?
Thanks for your help
joerg
--
Super-Acktion nur in der GMX Spieleflat: 10 Tage f?r 1 Euro.
?ber 180 Spiele downloaden und spiele: http://flat.games.gmx.de
2005 Feb 08
2
batch jobs question
Hi,there
I'm doing some R batch jobs in Unix.
Something like
R <prog1> output1 --save &
R <prog2> output2 --save &
prog1 and prog2 are running at the same time and they are essentially same except it contains different parameter values.
I was wondering if two processes will affect each other? Hopefully they are two independent jobs.
It's a beginner's...
2008 Jul 21
1
Howto Restart A Function with Try-Error Catch
...ng class.
2. Redo the function if it returns "try-error"
3. Otherwise keep the output of the function.
I'm not sure how to create the above construct.
The code I have below doesn't work:
__BEGIN__
myfunction <- function(the_x) {
# do something
a = list(output1=val1, output2 = val2)
a
}
out <- try(suppressWarnings(myfunction(x)),silent=T)
if (class(out) == "try-error") {
#this clause doesn't seem to "redo"
out <- myfunction(X)
}
else {
ll <- out$out...
2004 Jan 07
4
Ogg checksum thingie needed
I need some sort of utility to calculate a checksum of an Ogg file.
Two differently encoded Ogg:s should give different checksums, but the
same file with different tags should give the same result.
(The serial number doesn't work here, obviously. I need something that
is changed if a bit of the file is lost.)
--
Björn Lindström <bkhl@elektrubadur.se>
http://bkhl.elektrubadur.se/
2009 May 19
4
nlrwr package. Error when fitting the optimal Box-Cox transformation with two variables
...97.90,1631.40,1794.40,1954.90,2188.80,2371.70,2563.60)
Y<-c(2208.30,2271.40,2365.60,2423.30,2416.20,2484.80,2608.50,2744.10,2729.30,2695.00,2826.70,2958.60,3115.20,3192.40,3187.10,3248.80,3166.00,3277.70,3492.00,3573.50)
money<-data.frame(r,M,Y)
attach(money)
ols1<-lm(log(M)~log(r)+log(Y))
output1<-summary(ols1)
coef1<-ols1$coefficients
a1<-coef1[[1]]
b11<-coef1[[2]]
b21<-coef1[[3]]
money.m1<-nls(log(M)~a+b*r^g+c*Y^g,data=money,start=list(a=a1,b=b11,g=1,c=b21))
summary(money.m1)
money.m2<-boxcox(money.m1)
Prof. Ikerne del Valle Erkiaga
Department of Applied Economi...
2009 Sep 02
2
Average over data sets
Hello,
I have a number of files output1.dat, output2.dat, ... , output20.dat,
each of which monitors several variables over a fixed number of
timepoints. From this I want to create a data frame which contains the
mean value between all files, for each timepoint and each variable.
The code below works, but it seems like I should be...
2007 Mar 15
0
Covariance matrix calc method question
...it would be appreciated. Basically, I kind of want to run some sort of
simulation along
the lines of below to check whether this could be the reason for the
differences. Thanks.
x<-c(11,12,13,14,16)
y<-c(2,4,6,8,12)
z<-c(14,18,22,50,20)
LHS<-cbind(x,y)
sample<-nrow(lhs)
# METHOD1
output1<-lm(LHS ~ z)
resids<-resid(output1)
sigma.hat1<-crossprod(resids)/sample
print(sigma.hat1)
print(det(sigma.hat1))
# METHOD2
fit1<-lm(LHS[,1] ~ z)
fit2<-lm(LHS[,2] ~ z)
correctionfactor<-sample-1/sample
sigma.hat2<-correctionfactor*var(cbind(resid(fit1),resid(fit2)))
print...
2009 Aug 10
3
how use cat() function?
i want to print in the console and to have an excel file like this
no_GWP NbOfPolicyClass1[0-1000] NbOfPolicyClass2[1000-3000] NbOfPolicyClass3[> 3000]
No_GWPMax=8 NbpolicyClass1=5 NbpolicyClass2=4 NbpolicyClass3 =3
i have do it like this:!!!
data1 <-
2010 Mar 03
1
List of zoo dataframes
...has 2 specifications (calls)
for a function (say, "analysis(specification, inputdata)" ) that runs
some statistical manipulations (regressions, nonlin models, etc. etc.)
on the elements of the zoo data frames. Thus I want to be able to run
(this is pseudo R code):
for (i in 1:3)
{
output1<-analysis(b[1], a[i])
output2<-analysis(b[2], a[i])
}
Thanks in advance for any pointers or help.
Best,
Costas
[[alternative HTML version deleted]]
2002 Aug 11
0
Problems installing printerdriver after successful upload to samba-2.2.5
...files are in /usr/local/samba/printer/W32X86/3/
Looks still good here.
- Now, rpcclient addprinter:
rpcclient debian -d 10 -A /scratch/authfile.txt -c "addprinter \"lj8000\"
\"lj8000\" \"HP LaserJet 8000 Series PCL 6\" \"Samba Printer Port\""
>output1.txt 2>&1
it gives me: result was NT_STATUS_UNSUCCESSFUL
but why ? let's see the *complete* debug output at:
It's WERR_ACCESS_DENIED
Now the my addprinter.pl script has added the following lines to my
/etc/printcap, as well as to my smb.conf file:
lj8000:\
:lp=:rm=thomas.at....
2010 Nov 15
3
merge two dataset and replace missing by 0
Hi r users,
I have two data sets (X1, X2). For example,
time1<-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 ,211 )
outpue1<-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26 ,15 ,12 ,6 ,2 ,1 )
X1<-cbind(time1,outpue1)
time2<-c( 0 ,8 ,15 , 22 ,43 , 64 ,85 ,106 ,148)
output2<-c( 5 ,5 ,4 ,5 ,5 ,4 ,1 ,2 , 1 )
X2<-cbind(time2,output2)
I want to