Displaying 20 results from an estimated 600 matches similar to: "Another loop avoidance question."
2007 Jun 19
1
A question about plots and lists in functions
R-helpers:
I tried googling and couldn't find anything.
I 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,
2008 Feb 13
4
rolling sum (like in Rmetrics package)
Hello, I'm new to R and would like to know how to create a vector of "rolling
sums". (I have seen the 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
2010 Dec 23
5
Writing a single output file
Dear R helpers!
Let me first wish all of you "Merry Christmas and Very Happy New year 2011"
"Christmas day is a day of Joy and Charity,
May God make you rich in both" - Phillips Brooks
## ----------------------------------------------------------------------------------------------------------------------------
I have a process which generates number of outputs. The R code
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
2012 Oct 11
2
Repeating a series of commands
I'm trying to figure out how to repeat a series of commands in R and have the
outputs added to a dataframe after each iteration.
My code starts this way...
a<-read.csv("File1.csv")
b<-read.csv("File2.csv")
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 question
2008 Jul 21
1
Howto Restart A Function with Try-Error Catch
Hi all,
I have a function - let's call it "myfunction". This function is based
on some random
number generator. Now, once in a while the function will break/crash depending
on the random number it generate inside the function.
To avoid the problem, what I intend to do is the following:
1. Catch the try-error using class.
2. Redo the function if it returns "try-error"
3.
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
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 able to do the
second part without a for loop. I played
2010 Mar 03
1
List of zoo dataframes
Hello,
I have various datasets of zoo time series (merged into single frames
via the "merge" command) such as
date var0 var1 var2 var3
08/07/1996 652.54 0.223922 0.515819 0.502638
08/08/1996 662.59 0.997841 0.000383 0.999806
06/09/1996 655.68 0.901685 0.569763 0.866333
08/10/1996 700.64 0.268855 0.244701 0.329285
08/11/1996 730.82 0.438407 0.501427 0.461374
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 <-
2011 Jun 29
3
[LLVMdev] specint2000 as external tests
Hi Duncan,
Do you have sources also in
the $LLVM_SRC_ROOT/projects/test-suite/External/SPEC/CINT2000/164.gzip?
The following is content of above directory in my case. I have copied the
CINT2000 sources in this directory manually.
$ls -1 $LLVM_SRC_ROOT/projects/test-suite/External/SPEC/CINT2000/164.gzip
164.gzip.reference_output
164.gzip.reference_output.small
compile_info
compile_parms
2002 Aug 11
0
Problems installing printerdriver after successful upload to samba-2.2.5
Here is what I do. It gets explained step by step.
At the end of this mail you will find my references used in the text by
[0] and so on.
- starting with initial setup
- getdriverdir NT x86
- uploading files with smbclient prompt; cd W32X86
- addriver
- addprinter
- debian:/scratch/W32X86# rpcclient debian -d 1 -A /scratch/authfile.txt -c
"enumdrivers"
-
2009 May 19
4
nlrwr package. Error when fitting the optimal Box-Cox transformation with two variables
Dear all:
I'm trying to fit the optimal Box-Cox
transformation related to nls (see the code
below) for the demand of money data in Green (3th
Edition) but in the last step R gives the next
error message.
Error en
`[.data.frame`(eval(object$data), ,
as.character(formula(object)[[2]])[2]) :
undefined columns selected.
?Any idea to solve the problem?
Thanks in advance,
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/
2012 Nov 04
1
structural equations using sem package
Hello
I am using sem to look at the direct effect of one variable on another but i am uncertain if i am progressing correctly.
An example:
covar1<-? matrix(c(0.4,-0.2,3,-0.2 , 0.3,-2 , 3 ,-2 , 60), nrow=3,byrow=T)
rownames(covar1)<-colnames(covar1)<-c("endo","exo","med")
path1<-matrix(c(? ? "exo -> endo",? "g1", NA,
2011 Jun 29
0
[LLVMdev] specint2000 as external tests
My source directory wasn't correct but now I have a correct test directory
structure.
$ls -1 ~/tmp/speccpu2000/benchspec/CINT2000/164.gzip/
data
docs
exe
result
run
Spec
src
version
I reconfigured the llvm with ../configure
--prefix=/home/dskhudia/tmp/llvm-install
--with-llvmgccdir=/home/dskhudia/tmp/llvm-install
--with-externals=/home/dskhudia/tmp
Now I can execute the make -C 164.gzip but
2005 Dec 08
10
smbclient lookup fails when querying local machine
Debian Sarge, Samba 2.2.12 (legacy install), openLDAP 2.2.17, connecting to a PDC running Samba 2.2.8a. The machine in question failed DIAGNOSIS.txt step 3.
I've got a really odd issue -- a Samba server that can "smbclient -L" everyone but itself. Samba still serves shares and PDC authentication works fine, but this failure is annoying, and as such, must be fixed. :)
--
issued
2016 Jun 22
3
Re: [libvirt-users] virt-sparsify changing the apparent-size of files
On Wed, Jun 22, 2016 at 12:40:40AM -0500, libvirt_users@skagitattic.com wrote:
> So you are saying when I do the virt-sparsify its converting the image
> from raw to [qcow2]?
No. virt-sparsify will use the same input and output formats, unless
you use the --convert option.
> I studied the man page for virt-sparsify and tried again with
> the flag "--format raw"
2012 Oct 18
1
legend of maps generated by function symbols
I generated maps with the function symbols (graphics). These are basic
maps generated with :
symbols(x,y,circles=myvariable)
where x et y are spatial coordinates corresponding to replicates of
"myvariable".
I would associate legend to this kind of maps, is it possible?
Regards,
Marion.
--
Marion Jacquot
Laboratoire de Chrono-environnement
UMR UFC/CNRS 6249 USC INRA
Universit? de