similar to: get list index

Displaying 20 results from an estimated 2000 matches similar to: "get list index"

2010 Jul 13
2
modifying vector elements
Hello R-users, I have a very large vector (a) containing elements consisting of numbers and letters, this is the i.e. a [1] "1.11.2a" "1.11.2d" "1.11.2e" "1.11.2f" "1.11.2x1" "1.11.2x1b" [7] "1.11.2x2" "1.11.2x2a" "1.11.2x2b" "1.11.2x3" "1.11.2x4"
2010 Aug 11
2
storing the results of an apply call
Hi R-users, I have a function (myfun) that I want to apply to the rows of a matrix. Basically, "myfun" takes the values from the matrix ("exp.des"), which represent the different combinations of my experimental design, and pass them as arguments to some other functions (fun1 and fun2). As I want to replicate the results of fun1 and fun2 a certain number of time (e.g. 5), I
2010 Oct 11
1
running R script on linux server
Hi R-users, I have a problem running my R code on a Linux cluster. What I did was write a .pbs file to instruct the cluster on what to do and how: #!/bin/sh #PBS -m ae #PBS -M uqlcatta@uq.edu.au #PBS -A uq-CSER #PBS -N job1_lollo #PBS -l select=1:ncpus=1:NodeType=fast:mem=8GB #PBS -l walltime=999:00:00 cd $PBS_O_WORKDIR source /usr/share/modules/init/bash module
2013 May 23
1
sample(c(0, 1)...) vs. rbinom
Greetings.? My wife is teaching an introductory stat class at UC Davis.? The class emphasizes the use of simulations, rather than mathematics, to get insight into statistics, and R is the mandated tool.?? A student in the class recently inquired about different approaches to sampling from a binomial distribution.? I've appended some code that exhibits the idea, the gist of which is that using
2010 Mar 31
1
Weird R behaviour?
Dear list, I have observed a weird behaviour from R --- apologies if I am missing something obvious! df3f826f28 df3f826f28 Say you type in R: >c.preec <- 10074 >c.gd <- 2200 >p1 <- .2 >c.neo <- p1*9451 + (1-p1)*3883 >n.preec <- 3710 >n.gd <- 2650 >n.neo <- 2120 >n.pcos <- 53000 >unit.met <- 94 >cost.met <- 94*n.pcos >effect <-
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my df. When I want to create the plot I have this problem: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ. I try this code: library(dplR) df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL) write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2007 Apr 11
1
Programming Problem (for loop, random # control, 3 dimentional graph)
Dear List, This is just a programming problem which i cannot seem to figure out. I am trying to get a set of power from a test (say, kolmogorov smirnov) out of a distribution (say, G-K distribution) as follows. I am trying to reduce to pain of writing the whole set of data points (p# below) using "for" loop. However, I seem to have some problem in it as the output "M" does not
2011 Jan 21
4
clustering fuzzy
hello, i'm pete ,how can i order rows of matrix by max to min value? I have a matrix of membership degrees, with 82 (i) rows and K coloumns, K are clusters. I need first and second largest elements of the i-th row. for example 1 0.66 0.04 0.01 0.30 2 0.02 0.89 0.09 0.00 3 0.06 0.92 0.01 0.01 4 0.07 0.71 0.21 0.01 5 0.10 0.85 0.04 0.01 6 0.91 0.04 0.02 0.02 7 0.00 0.01 0.98 0.00 8 0.02
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2009 Oct 29
1
Re trieving comments from PostgreSQL tables with RODBC and psqlodbc
I don't know whether this is an RODBC issue, a psqlodbc issue or a PostgreSQL issue; I've searched the documentation and forums for each, with no success. I want to list all the tables in a PostgreSQL schema, and return the table comments as well as the table names. As an example, one table is defined as follows: CREATE TABLE scen990.ezone_locationprice_year1 ( ezone integer NOT NULL,
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values > dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2013 Mar 06
3
About basic logical operators
Hello everyone,           I have a basic question regarding logical operators. > x<-seq(-1,1,by=0.02) > x   [1] -1.00 -0.98 -0.96 -0.94 -0.92 -0.90 -0.88 -0.86 -0.84 -0.82 -0.80 -0.78  [13] -0.76 -0.74 -0.72 -0.70 -0.68 -0.66 -0.64 -0.62 -0.60 -0.58 -0.56 -0.54  [25] -0.52 -0.50 -0.48 -0.46 -0.44 -0.42 -0.40 -0.38 -0.36 -0.34 -0.32 -0.30  [37] -0.28 -0.26 -0.24 -0.22 -0.20 -0.18 -0.16
2010 May 17
3
applying quantile to a list using values of another object as probs
Hi r-users, I have a matrix B and a list of 3x3 matrices (mylist). I want to calculate the quantiles in the list using each of the value of B as probabilities. The codes I wrote are: B <- matrix (runif(12, 0, 1), 3, 4) mylist <- lapply(mylist, function(x) {matrix (rnorm(9), 3, 3)}) for (i in 1:length(B)) { quant <- lapply (mylist, quantile, probs=B[i]) } But quant
2010 Feb 17
2
extract the data that match
Hi r-users,   I would like to extract the data that match.  Attached is my data: I'm interested in matchind the value in column 'intg' with value in column 'rand_no' > cbind(z=z,intg=dd,rand_no = rr)             z  intg rand_no    [1,]  0.00 0.000   0.001    [2,]  0.01 0.000   0.002    [3,]  0.02 0.000   0.002    [4,]  0.03 0.000   0.003    [5,]  0.04 0.000   0.003    [6,] 
2012 Apr 08
2
xyplot() does not plot legends with "relation=free" scales
Hi all, I have this problem with lattice that xyplot() won't draw some of my axis labels if the type (i.e. the relation argument) of scales is set as free. For example, in the plot below, I would want it to also show: 1. the labels E1,...E6 below the 10th panel (i.e. 3rd row, 2 col)....just as it is now done below the 12th panel.... 2. as well as the labels (2,4,6,8) on the top of panels 1
2008 Jan 24
6
[LLVMdev] 2.2 Prerelease available for testing
LLVMers, The 2.2 prerelease is now available for testing: http://llvm.org/prereleases/2.2/ If anyone can help test this release, I ask that you do the following: 1) Build llvm and llvm-gcc (or use a binary). You may build release (default) or debug. You may pick llvm-gcc-4.0, llvm-gcc-4.2, or both. 2) Run 'make check'. 3) In llvm-test, run 'make TEST=nightly report'. 4) When
2013 May 23
4
[LLVMdev] Polyhedron 2005 results for dragonegg 3.3svn
Below are the results for the Polyhedron 2005 benchmarks compiled with llvm/compiler-rt/dragonegg 3.3svn at r182439 against current FSF gcc 4.7.3svn and 4.8.1svn. The only major bug remaining in the dragonegg 3.3svn support for gcc 4.8.x is http://llvm.org/bugs/show_bug.cgi?id=15980 which results in unresolved symbols for _iround and _iroundf in the aermod and rnflow testcases. Note that this
2009 Feb 07
11
[LLVMdev] 2.5 Pre-release1 available for testing
LLVMers, The 2.5 pre-release is available for testing: http://llvm.org/prereleases/2.5/ If you have time, I'd appreciate anyone who can help test the release. Please do the following: 1) Download/compile llvm source, and either compile llvm-gcc source or use llvm-gcc binary (please compile llvm-gcc with fortran if you can). 2) Run make check, send me the testrun.log 3) Run "make
2009 Oct 20
0
[LLVMdev] 2.6 pre-release2 ready for testing
Hi Tanya, > 1) Compile llvm from source and untar the llvm-test in the projects > directory (name it llvm-test or test-suite). Choose to use a > pre-compiled llvm-gcc or re-compile it yourself. I compiled llvm and llvm-gcc with separate objects directories. Platform is x86_64-linux-gnu. > 2) Run make check, report any failures (FAIL or unexpected pass). Note > that you need to
2007 Sep 15
22
[LLVMdev] 2.1 Pre-Release Available (testers needed)
LLVMers, The 2.1 pre-release (version 1) is available for testing: http://llvm.org/prereleases/2.1/version1/ I'm looking for members of the LLVM community to test the 2.1 release. There are 2 ways you can help: 1) Download llvm-2.1, llvm-test-2.1, and the appropriate llvm-gcc4.0 binary. Run "make check" and the full llvm-test suite (make TEST=nightly report). 2) Download