Displaying 20 results from an estimated 20000 matches similar to: "Substituting numerical values using `apply'"
2004 Jul 07
3
Problems installing asterisk.
When installing asterisk, I follow de "Getting Started" manual and i get the
following error while compilig asterisk:
if [ -d CVS ] && ! [ -f .version ]; then echo CVS-HEAD-08/06/04-09:53:57 >
.version; fi
bison ast_expr.y --name-prefix=ast_yy -o ast_expr.c
make: *** [ast_expr.c] broken pipe
Just this, nothing else.
Zaptel and Libpri installed without any problem and system
2003 Apr 10
3
multiple numerical variables in aov
Hi all,
I have a question regarding the anova function aov(). I want to perform an anova calculation
using one grouping variable but more than one numerical variables:
So instead of:
aov(v ~ g)
I want something like
aov(v1 + v2 + v3 ~ g)
Essentially I want to find out whether the variables v1, v2, v3, etc can collectively discriminate
between different values of variable g. Could
2003 Mar 14
2
boxplots with multiple numerical variables
Hi all,
I have a question regarding the boxplot function. The data I am working on has 1 grouping
variable (G) and it has many numerical variables (V1, V2, V3, V4, Vx, etc). What I would like to
do is create a boxplot where the Y-axis represents the numerical values of variable V1...Vx (all
the variables have the same range). The X-axis needs to represent the G-V combination. So suppose
the
2011 Feb 25
5
Substituting inside expression
I am having following problem:
I?m constructing model for calculation of area of triangle.
I know sides a, b, and gamma angle.
I wish to calculate the area using heron?s formula:
S <- sqrt(s*(s-a)*(s-b)*(s-c))
where
s <- (a+b+c)/2
and c is calculated using law of cosines:
c <- sqrt(a^2 + b^2 -2*a*b*cos(gamma))
since i am calculating a regression model, i need derivation of this
2002 Sep 27
2
How to apply SSfpl with binary data
Dear R-help subscribers
Would you tell me how to apply SSfpl with binary data as below?
Unfortunately, there is not the EXAMPLE in help(SSfpl) for binary data but for quantitative data(Chick).
V1: dose
V2: log-transformed dose
V3: response (rate)
V1 V2 V3
1 0.775 -0.2548922 0.1666667
2 5.000 1.6094379 0.8148148
3 10.000 2.3025851 0.5000000
4 20.000 2.9957323
2012 Jun 15
8
Apply() on columns
Hi,
I have some trouble with the following: I have a table of 7 rows and
6columns. The columns 1,2,3 have information about the number of employees.
The columns 4,5,6 have information about the number of working hours. Each
row, is corresponding with a week.
My goal is to make a boxplot, histogram etc. of the columns 4, 5 and 6
(thus, the data of the number of working hours). How can I select by
2003 Feb 14
1
FW: [Fwd: Re: [S] Exact p-values]
Dear all
Just for fun, I have just downloaded the paper mentioned below and checked
it with R-1.6.1.
Everything is ok with exception of Table 2b, where I get always 1 instead of
0.5:
> pbinom(1e15,2e15,0.5)
[1] 1
Which value should be correct?
Best regards
Christian Stratowa
==============================================
Christian Stratowa, PhD
Boehringer Ingelheim Austria
Dept NCE Lead
2007 Feb 06
3
installing packages and windows vista
I installed R (R-2.4.1-win32.exe) on a new computer with Windows Vista
and a 64 bit operating system (hp dv9000 with intel core t7200). The
base R runs fine, but I can not get any of the packages to load. From
within R I choose install packages choose a site then a package. I
tried installing 2 packages and get similar errors (see below), I just
copied and pasted lines from R.
Can anyone
2007 Aug 27
1
use apply function with which
Dear R-users,
For a data frame (say in this example X) I want to look up the
corresponding value in a 'look-up data frame' (in this example Y). The
for-loop works but is very time-consuming because 'X' in reality is very
big.
Therefore I would like to have a solution with apply. However, I do not
succeed. Any suggestions?
Thanks in advance,
Hanneke
2015 Dec 29
2
moving LDAP from one domain to another
Hello,
I am moving LDAP from one domain to another
We have moved off of a.wustl.edu network to b.school.edu network.
I have searched
vi /etc/nslcd.conf
vi /etc/openldap/ldap.conf
and removed all referances to "a"
I restarted
/etc/init.d/nscd restart
this is redhat 6.7, and my ldap server is now ldap.b.wustl.edu:389
a.school.edu to b.school.edu
I keep getting messages
2018 May 02
2
using apply
Hi
I have 3 dataframes, a,b,c with 0/1 values...i have to check a condition
for dataframe a and b and then input the rows ids to datframe c . In the if
condition, I AND the 2 rows of from a and b and then see if the result is
equal to one of them.
I have done this using a for loop, however, it takes a long time to execute
with larger dataset..Can you help me do it using apply function so that i
2018 May 02
0
using apply
Hi Neha,
Perhaps merge() from base or join from dplyr is what you are looking for.
data. table could also be interesting.
Hth
Ulrik
On Wed, 2 May 2018, 21:28 Neha Aggarwal, <aggarwalneha2000 at gmail.com> wrote:
> Hi
>
> I have 3 dataframes, a,b,c with 0/1 values...i have to check a condition
> for dataframe a and b and then input the rows ids to datframe c . In the if
>
2008 Jul 25
3
Numerical question
Hi all,
I have n independent variables A_1, A_2, A_3,......,A_n, and each with known variances var(A_1), var(A_2),..., but unknown mean. How can I get the approximation of the variance of the product of the variables using numerical computation, i.e. var(A_1*A_2*A_3*.....*A_n)? Thanks.
Sincerely,
Yanwei Zhang
Department of Actuarial Research and Modeling
Munich Re America
Tel: 609-275-2176
2011 Nov 18
3
Apply functions along "layers" of a data matrix
Hello
How can I apply functions along "layers" of a data matrix?
Example:
daf <- data.frame(
'id' = rep(1:5, 3),
matrix(1:60, nrow=15, dimnames=list( NULL, paste('v', 1:4, sep='') )),
rep = rep(1:3, each=5)
)
The data frame "daf" contains 3 repetitions/layers (rep) of 4 variables
of 5 persons (id). For some reason, I want to calculate
2010 Aug 29
1
Finding functions of large dataset for numerical integration
Hello everyone,
I have been trying to figure out away to integrate under a spline produced
by the package tps(fields). As the package does not output functions I am
trying to do something similar to the trapezium rule. My data are 3D (x, y &
z). I have extracted from the surface output by Tps the values of z at
regular intervals so that I have a grid of figures, for example:
1 4 6 6 8
8
2007 Oct 23
2
2-D numerical integration over odd region
Hello all,
I'm hoping to find a way to evaluate the following sort of integral in R.
\int_a^b \int_{g(y)}^Inf f(x,y) dx dy.
The integral has no closed form and so must be evaluated numerically. The "adapt" package provides
for multidimensional integration but does not appear to allow the limits of integration to be a
function. I need to evaluate a number of integrals of this
2008 Dec 22
1
imputing the numerical columns of a dataframe, returning the rest unchanged
Hi R-experts,
how can I apply a function to each numeric column of a data frame and return
the whole data frame with changes in numeric columns only?
In my case I want to do a median imputation of the numeric columns and
retain the other columns. My dataframe (DF) contains factors, characters and
numerics.
I tried the following but that does not work:
foo <- function(x){
2010 Jan 29
1
apply function with grouped columns
I have a data set of many rows and many columns in which both the rows and
the columns have associated grouping factors.
Is there a way to do what 'aggregate' does but in the other dimension?
The way I have been doing this is to use 'aggregate' on the data in the
usual way and then rotate the result and apply 'aggregate' again. This
works but is a little messy and I was
2008 Nov 22
1
applying an operation for several dataframes
Dear R community,
I am trying to apply a simple operation to several dataframes (e.g.
nrow) and cannot get the looping to work. My objective is to get an output
that indicates me the number of rows for every dataframe.
> c
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
1 1 11 21 31 41 51 61 71 81 91
2 2 12 22 32 42 52 62 72 82 92
3 3 13 23 33 43 53 63 73 83 93
4 4 14 24 34 44 54 64 74 84 94
5 5
2007 May 10
4
apply( )
I have a question that must have a simple answer (but eludes me).
I need a row-by-row logical comparison across three numeric variables
in
a data frame: foo$x, foo$y, foo$z. The logic is
if( x < y || x > z ) 1 else 0
for a particular row.
It is simple and very inefficient to use for(i in 1:length(foo$x)){ }
loops. How can I accomplish this using sappy( ) / lapply( ) / apply( )
or