Displaying 20 results from an estimated 3000 matches similar to: "'fixing' list components"
2008 Nov 20
2
Elegant way to transform dataframe?
Hello,
I have a dataframe with columns like:
parameter1 parameter2 metricname value
and I'd like to transform it into a dataframe with columns:
parameter1 parameter2 metric1 metric2 metric3
where the values for each metric would be in the appropriate column. There are often multiple values for a given (parameter1, parameter2, metricname) triple. In this case, I want to use the
2010 Jan 29
3
Applying a function on each columns of a matrix
Hello everyone, I have the following matrix
[,1] [,2] [,3] [,4]
[1,] 0.002809706 0.0063856960 0.0063856960 0.011749681
[2,] 0.004893124 0.0023118418 -0.0005122951 -0.014646465
[3,] 0.003547897 0.0063355297 0.0030410542 0.011403953
[4,] 0.004838299 -0.0040383645 -0.0090406831 -0.011027569
[5,] 0.035648755 0.0334815590 0.0380977404
2007 Mar 27
1
basic handling of data.frame
Hello,
I'm new to R but wan't to use it to compute the statistics of my medical study.
The study includes several parameters for a number of patients. Each
parameter was assessed by a number of readers, once with a special
condition, once without.
Now I have a data.frame with colums like:
PatientID, ReaderID, SpecialCond(yes/no), Parameter1, Parameter2.....
the rows are not sorted, and
2006 Oct 05
2
A statement over multiple lines (i.e. the ... feature in Matlab)
Hello again list,
I thought I'd start a new thread, seeing as it's completely different
from my previous question. Some functions I have written require many
parameters, and so do not fit nicely into an 80 column width display.
This is usually avoided, by spreading that particular statement over
a few lines. This is something that I do in Matlab with the following:
myFunc(
2002 Nov 09
2
Nonlinear regression and categories
Hi there:
I'm trying to run a large number of nonlinear regressions on a time
series dataset, where the data will be formatted something to the effect of:
ObservationID,time,dependentvar
I'll have a number of time and dependentvars for each observation, and I
want to apply a nonlinear regression to one ObservationID at a time, and I
want to have a dataset that is the parameter
2007 Nov 01
1
structure data
Hello,
I have a quite simple question, I guess. I have a data frame and I would like
to process the data in several ways.
The processing is dependent on grouping (factors) and the parameter itself.
Meaning for parameter1 in the df, I would like to calculate the mean and sd
when grouping by factor1. But parameter2 might be different. I thought of a
structure like this:
group1
param1
2006 Oct 08
9
Organizing tests and mocha expectations
I''m simultaneously getting into using Mocha and RSpec-style tests
(courtesy of the simply_bdd plugin) and I''m struggling with some
issues while trying to organize my specs/test. Here''s a code example
illustrating the problem:
context "update cliient invalid data" do
include ClientsControllerSpecHelper
specify "should render edit form" do
2007 Jul 18
1
passing a parameter to a file from command line
Hi,
I have a file fileFoo.R, say that contains these two lines, invoking
function foo that is specified in "foo_details.R":
source("foo_details.R")
foo(parameter1)
I want to specify and pass parameter1 in my command line when invoking R
in linux: R --no-save <fileFoo.R.
How can I do that?
And how can I retrieve the value of parameter1 in my fileFoo.R function
2011 Sep 12
2
regression on data subsets in datafile
I have data of the form
tC <- textConnection("
Subject Date parameter1
bob 3/2/99 10
bob 4/2/99 10
bob 5/5/99 10
bob 6/27/99 NA
bob 8/35/01 10
bob 3/2/02 10
steve 1/2/99 4
steve 2/2/00 7
steve 3/2/01 10
steve 4/2/02 NA
steve 5/2/03 16
kevin 6/5/04 24
")
data <- read.table(header=TRUE, tC)
close.connection(tC)
rm(tC)
I am trying to calculate rate of change of parameter1 in
2012 Jun 18
1
using hiera for node classification
Hi All,
I''ve been trying to use Hiera for node classification, my sit.pp is simple:
node default {
hiera_include("classes")
}
which has been working well with simple class definitions like:
user@host$ cat testagent.yaml 2012-06-18 14:55:48 jon pts/13
---
classes:
- motd
Is anyone doing this in production? I''ve seen a little about this on line
but it
2020 Jun 12
2
Send message to AMI from dialplan
Is it possible to simply send a message to appear as an AMI message/event,
from the dialplan? For example
exten =>123,1,ami(myEvent, param1, param2)
and in the AMI a message appears like:
Event: myEvent
Privilege: call,all
Channel: PJSIP/misspiggy-00000001
Uniqueid: 1368479157.3
ChannelState: 3
ChannelStateDesc: Up
CallerIDNum: 657-5309
CallerIDName: Miss Piggy
2012 May 09
0
Error in outer() : dimension mismatch
Dear R users,
I am a new R user and have some difficulty
understanding the functioning of “outer”, where my question is from. I have
read the posts related to the questions on the outer function, but
unfortunately could not figure out where my mistake is.
I have a function with two variables and
three parameters (a density function that is not standard) and I want to draw
the contourplot along
2009 Jul 23
2
Constructing lists (yet, again)
This is an attempt to rescue an old R-help question that apparently
received
no response from the oblivion of collective silence, and besides I'm
also
curious about the answer
> From: Griffith Feeney (gfeeney at hawaii.edu)
> Date: Fri 28 Jan 2000 - 07:48:45 EST wrote (to R-help)
> Constructing lists with
>
> list(name1=name1, name2=name2, ...)
>
> is tedious when
2011 Apr 05
2
IFELSE function XXXX
Hello everyone,
This IFELSE function call is not working properly. I do not receive an error
message, but the actions are not executed conditional as I was hoping. Any
assistance is appreciated.
set.seed(12345)
res1<-rbinom(10000,1,.1)
rdata3<-transform(data.frame(res1),input1=rnorm(10000,50,10))
data3
#inducing correlation between res1 & input1
2013 Dec 02
1
Class parameter flexibility with ENC, hiera or both
Dear puppetteers,
I am having a philosophical question about parametrized classes.
When building modules, one wants to be as flexible as possible, to try
to target as many puppet flavors as possible. This is our target:
- Foreman users, using foreman as an ENC with smart variables (or
potentially any other ENC, but I would say this is the most widespread one).
- Pure Puppet''s site.pp
2001 May 19
2
calculations on diagonals of a matrix
Given an nxm matrix A I want to compute the nxm matrix B whose ij-th
element is the sum of the elements of A lying on the diagonal that ends
with element ij, i.e.,
b_ij = a_ij + a_(i-1)(j-1) + a_(i-2)(j-2) + ...
In APL (which I no longer use), I would use the 'rotate' operator to derive
an array whose columns are diagonals of the given array and then cumulate
down columns. Is
2007 Jun 05
2
.activate() behaviour
Hi all,
I''m trying to understand why the following code doesnt work...
----------------------------------------------------------------------------------------
<html>
<head>
<title>blabla</title>
<script type="text/javascript" src="prototype.js"></script>
</head>
<body>
<form action="bllalba">
2006 Oct 06
1
transactions not work for array?
Hi,
I have a transaction block as follow:
begin
Hello.transaction(input1,input2)
input1.save
for i in 0 to count
input2[i].input1_id = input1.id
input2[i].save
end
end
rescue
end
I have used validates_uniqueness_of for input2 in the model
The problem is, when there is duplicate record in input2, input1 and the
first record in input2
2010 May 29
3
[LLVMdev] Vectorized LLVM IR
Le 29 mai 2010 à 01:08, Bill Wendling a écrit :
> Hi Stéphane,
>
> The SSE support is the LLVM backend is fine. What is the code that's generated? Do you have some short examples of where LLVM doesn't do as well as the equivalent scalar code?
>
> -bw
>
> On May 28, 2010, at 12:13 PM, Stéphane Letz wrote:
We are actually testing LLVM for the Faust language
2010 May 29
0
[LLVMdev] Vectorized LLVM IR
On Sat, May 29, 2010 at 12:42 AM, Stéphane Letz <letz at grame.fr> wrote:
>
> Le 29 mai 2010 à 01:08, Bill Wendling a écrit :
>
>> Hi Stéphane,
>>
>> The SSE support is the LLVM backend is fine. What is the code that's generated? Do you have some short examples of where LLVM doesn't do as well as the equivalent scalar code?
>>
>> -bw
>>