Displaying 20 results from an estimated 10000 matches similar to: "Stuck trying to modify a function"
2012 Nov 16
1
Code works, but not as function.
Hi,
I have some values in a list format generated by the following:
Path_Number <- 0010
ID.Path <- formatC(0001:Path_Number, width=4, flag=0) # Make vector of ID's.
No_of_Effectors <- sample(1:550, length(ID.Path), replace=TRUE) # Define Number of Effectors each individual gets.
Effectors <- split(sample(1:10000, sum(No_of_Effectors), replace=TRUE), rep(ID.Path, No_of_Effectors))
2012 Nov 08
1
Extract cell of many values from dataframe cells and sample from them.
Hi,
First my apologies for a non-working piece of code in a previous submission, I have corrected this error.
I'm doing is individual based modelling of a pathogen and it's host. The way I've thought of doing this is with two dataframes, one of the pathogen and it's genes and effector genes, and one of the host and it's resistance genes. During the simulation, these things
2012 Oct 28
6
Having some Trouble Data Structures
Hi All,
I'm trying to run a simulation of host-pathogen evolution based around individuals.
What I need to have is a dataframe or table of some description - describing all the individuals of a pathogen population (so far I've implemented this as a matrix):
ID No_of_Effectors Effectors (Sequences)
[1,] 0001 3 ## 3
2018 May 30
2
Filtering using multiple rows in dplyr
Hi Folks,
I have just started using dplyr and could use some help getting unstuck. It could well be that dplyr is not the package to be using, but let me just pose the question and seek your advice.
Here is my basic data frame.
head(h)
subject ageGrp ear hearingGrp sex freq L2 Ldp Phidp NF SNR
1 HALAF032 A L A F 2 0 -23.54459 55.56005 -43.08282
2013 Jan 25
3
Removal of columns from matrix where all values of the column are identical.
Hi all,
I'd like to write a piece of code which will remove columns from a matrix, if the column contains only one value, say every value in the column is a "3":
Matrix <- matrix(NA, nrow=5, ncol=4)
Matrix[,1] <- c(1,2,3,4,5)
Matrix[,2] <- c(3,3,3,3,3)
Matrix[,3] <- c(5,4,3,2,1)
Matrix[,4] <- c(5,1,4,3,2)
[,1] [,2] [,3] [,4]
[1,] 1 3 5 5
[2,] 2
2013 Jan 24
1
Pairwise Comparrisons
Dear all,
I''m trying to write a function, that will take as an argument, some aligned genome sequences, and using a sliding window, do pairwise comparisons of sequence similarity. Coding the sliding window I think I can manage but what I''m trying to get to grips with is getting it so as every pairwise comparison is made, no matter how many genomes are added, from 3 to N.
So if
2009 May 01
1
integrate with large parameters
Dear R-users,
i have to integrate the following function
`fun1` <- function (a, l1, l2)
{
exp(log(l1) * (a - 1) - l2 * lgamma(a))
}
but if l1 is large, i get the "non-finite function value" error, so my
idea is to rescale with exp(-l1)
`fun2` <- function (a, l1, l2)
{
exp(log(l1) * (a - 1) - l2 * lgamma(a) - l1)
}
but it seems this doesn't solve the problem, when
2013 Apr 09
1
sorting the VAR model output according to variable names??
I was wondering if one can have the coefficients of VAR model sorted
according to variable names rather than lags. If you notice below, the
output is sorted according to lags.
>VAR(cbind(fossil,labour),p=2,type="const")
VAR Estimation Results:
=======================
Estimated coefficients for equation fossil:
===========================================
Call:
fossil = fossil.l1
2024 Nov 11
3
Interpreting data from 220V input APC UPS
John Ackermann N8UR via Nut-upsuser
<nut-upsuser at alioth-lists.debian.net> writes:
> I am monitoring via the SNMP driver an APC SmartUPS that has split
> phase (2L + neutral) 240V input and 120/120 volt outputs. The data
> for the voltages is not what I'm expecting, and I am wondering how I
> should interpret it.
Wow, that sounds kind of industrial. Model?
Is the
2011 Jun 27
4
How many L1/L2 my cpu have ?
Hi
Could anybody explain me how to check how many L1/L2 cache my cpu have.
I'm using CentOS 5.6
*cat /proc/cpuinfo |grep CPU *
model name : Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
model name : Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
Diagram of a generic dual-core processor, with CPU-local level 1 caches, and
a shared, on-die level 2 cache.
2024 Nov 11
1
Interpreting data from 220V input APC UPS
Hi --
I am monitoring via the SNMP driver an APC SmartUPS that has split phase
(2L + neutral) 240V input and 120/120 volt outputs. The data for the
voltages is not what I'm expecting, and I am wondering how I should
interpret it. Here is an example from upsc:
input.L1-L2.voltage: 121
input.L2-L3.voltage: 120
input.voltage: 121.20
output.current: 5.90
output.L1-L2.voltage: 119
2024 Nov 12
1
Interpreting data from 220V input APC UPS
Sounds pretty normal from what I see. It appears that this is *NOT* a true 240v UPS, but rather one that provides two legs of 120v output from two legs of 120 input, and what is seen as "L2" is actually neutral, and the line names are reporting incorrectly. With that in mind, each leg in should be 120v, as well as the outputs, which is exactly what you are seeing.(The fact tht L1 to L3
2024 Nov 12
1
Interpreting data from 220V input APC UPS
Thanks, Tim. The unit was available with single as well as split phase
output, and from the data I can find the input was single phase, though
the input connector has L1/L2/N/G wires. I'm digging through the MIB to
see what the raw data looks like.
Thanks!
John
----
On 11/11/24 19:14, Tim Dawson wrote:
> Sounds pretty normal from what I see. It appears that this is *NOT* a
> true
2024 Nov 16
1
Interpreting data from 220V input APC UPS
Following up on this, I've figured out what's going on. What I'm not
sure of is how best to address the situation. I'd like to avoid going
down to the MIB level because I just don't understand it.
"Split phase" output devices seem to fall into an undefined area.
They're not three phase, but require additional MIB values so APC uses
their 3-phase MIB
2007 Apr 16
1
Names in vector occurring in another vector
I have a vector of character strings such as
mainnames<-c("CAD","AUD") and another vector say
checknames<-c("CAD.l1","AUD.l1","JPY.l1","EUR.l1","CAD.l2","AUD.l2","JPY
.l2","EUR.l2")
I want a new vector of character strings that is just
2010 Aug 12
1
Need help to understand integrate function
Hi,
I'm running into a wall when trying to use the integrate function. I
have the following setting:
powerLaw2 <- function(x,l1,l2,c0,t0) {
idx <- which(x <= 0);
if (length(idx) > 0) {
x[idx] <- 0;
}
xl <- (-l1+l2)*log(x/t0);
L <- log(c0)-l1*log(x)-log(1+exp(xl));
L <- exp(L);
return(L);
}
plCDF2 <- function(x,l1,l2,c0,t0) {
2016 Sep 19
2
How to set QEMU qcow2 l2-cache-size using libvirt xml?
QEMU's default qcow2 L2 cache size is too small for large images (and small cluster sizes), resulting in very bad performance.
https://blogs.igalia.com/berto/2015/12/17/improving-disk-io-performance-in-qemu-2-5-with-the-qcow2-l2-cache/
shows huge performance hit for a 20GB qcow2 with default 64kB cluster size:
L2 Cache, MiB Average IOPS
1 (default) 5100
1.5
2010 Aug 02
2
[LLVMdev] indirectbr and phi instructions
Hi,
How does the requirement that phi instructions have one value per
predecessor basic block interact with indirectbr instructions? For
instance, take the following code:
L1:
br i1 %somevalue, label %L2, label %L3
L2:
%ret1 = i8* blockaddress(@myfunction, %L5)
br label %L4
L3:
%ret2 = i8* blockaddress(@myfunction, %L6)
br label %L4
L4:
%ret = phi i8* [%ret1, L2], [%ret2, L3]
2014 Jun 26
2
[LLVMdev] cross-section differences in MC generation
I think that's incorrect. It should to:
.section .foo
.L1:
.L2 = .L1
.section .bar
.long .L3-.L2
.L3:
Because .L3 and .L2 are in different sections.
- Justin
On Thu, Jun 26, 2014 at 2:46 PM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> This reduces to
>
> .section .foo
> .L1:
> .L2 = .L1
> .section .bar
> .long .L1-.L2
>
>
> Which is fairly
2009 Mar 28
1
calculating average for multiple subclasses in a data set
Hello R users,
I have a data set which is a set of lengths and types of objects. I want
to calculate the mean length for each type of object as opposed to the
mean of all the objects in the set.
This is in order to make a comparison between the lengths of each type
of objects and the number of those objects.
> x
Chromosome Begin End Type Class Norm Length
458327