similar to: For loop indicies

Displaying 20 results from an estimated 2000 matches similar to: "For loop indicies"

2011 Jul 16
1
Max within groups
I know there's a really easy way to do this but I just can't track it down. I experimented with various apply functions but couldn't get it quite right. I have a matrix like this: 1, 16 1, 23 1, 21 1, 6 1, 25 2, 4 2, 17 2, 45 2, 11 2, 20 and I'd like to find the max value in Column 2 (or the index to the max value) grouped by the first column. So the max for Group 1, the max for
2012 Jun 25
1
Replacing text with a carriage return
I have a comma separated data file with no carriage returns and what I'd like to do is 1. read the data as a block text 2. search for the string that starts each record "record_start", and replace this with a carriage return. Replace will do, or just add a carriage return before it. The string is the same for each record, but it is enclosed in double quote marks in the file.
2011 Dec 07
2
arules package intsallation
I'm using R version 2.13.0 (2011-04-13) on Mac OS X and I get the following error message with library(arules): Loading required package: Matrix Loading required package: lattice Attaching package: 'Matrix' The following object(s) are masked from 'package:base': det Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object
2013 Mar 08
1
Ports
I realise this isn't exactly an R query, but does anyone know what ports I need to open in order to get the install package function working? It's blocked by our University firewall. I have been asked for the following info and I don't know where to find it or how to get it. I guess my computer knows this info - it knows where it's trying to connect to - but I don't
2011 Jun 24
1
Installing packages
Hi, I am trying to install the network package at my work computer. I'm using R version 2.12.0 (2010-10-15) At home I can use the Package Installer, but at work this is blocked by our firewall. What I usually do is download the Mac binary and copy it to R.Framework/Resources/Library, but this isn't working with network. I get the following, which I think means I have the wrong binary for
2005 Apr 13
5
Binary Matrices
I'm wanting to perform analysis (e.g. using eigen()) of binary matrices - i.e. matrices comprising 0s and 1s. For example: n<-1000 test.mat<-matrix(round(runif(n^2)),n,n) eigen(test.mat,only.values=T) Is there a more efficient way of setting up test.mat, as each cell only requires a binary digit? I imagine R is setting up a structure which could contain n^2 floats. Thanks in advance
2012 Dec 09
2
Problem with secondary sata controller
I am having problems getting my 64-bit Debian Squeeze (Xen version 4.0, Linux Kernel 2.6.32) dom0 to recognize a harddrive connected to a secondary sata controller. My motherboard is a Gigabyte GA-X79-UP4 and has two sata controllers. The first is controlled by an Intel X79 chipset and the second is controlled by a Marvell 88SE9172 chip. During the initial install of Debian everything is fine and
2011 Sep 01
2
Automatic Recoding
I have a text file full of numbers (it's a edgelist for a graph) and I would like to recode the numbers as they are way too big to work with. So for instance the following: 676529098667 1000198767829 676529098667 100867672856227 676529098667 91098726278 676529098667 98928373 1092837363526 716172829 would become: 0 1 0 2 0 3 0 4 5 6 i.e. all 676529098667 would become
2012 Jun 22
3
removing NA from a data frame
Removing rows with NAs, using na.omit(), doesn't seem to be working for me. Dataset: > str ( ex10s ) 'data.frame': 2189576 obs. of 5 variables: $ LOPNR : int 58 58 58 58 64 64 64 64 64 64 ... $ DIAGNOS: Factor w/ 173 levels "F20","F200","F2000",..: 128 128 128 128 105 105 105 160 105 105 ... $ X_DATE : int 20060821 20061207 20080102 20090904
2011 Mar 23
1
R CMD check: building indices error
Hi guys, I am updating a package because of data format in data folder. So I just change an extension of a file to .txt ... nothing more. I get this error on the R CMD check ** help *** installing help indices ** building package indices ... Error in read.table(zfile, header = TRUE, as.is = FALSE) : more columns than column names ERREUR : installing package indices failed Note that the R CMD
2010 Jan 07
1
Quantreg - 'could not find function"rq"'
Hi all, I'm having some troubles with the Quantreg package. I am using R version 2.10.0, and have downloaded the most recent version of Quantreg (4.44) and SparseM (0.83 - required package). However, when I try to run an analysis (e.g. fit1<-rq(y~x, tau=0.5)) I get an error message saying that the function "rq" could not be found. I get the same message when I try to search
2005 Oct 03
4
no config file
I've tried installing wine using synaptic on ubuntu, also compiling form source and a couple of other ways but never get a ./wine/config file ? Any idea what I'm doing wrong? Thanks Jim -- Dr. Jim Maas james.maas@nottingham.ac.uk This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system:
2012 Jul 18
3
'symbols' not plotting correct circle radii
Hi there. I have been plotting some circles using 'symbols', with radii representing my data, but the radii looked incorrect. It seems to happen with a single circle too: Symbols ( 0, 0, circles = 40, xlim = c(-40, 40), ylim= c(-40, 40)) If I put a ruler up to my monitor (technology!) to compare the radius with the axes, the circle isn't radius 40; it is closer to 15... I
2012 Oct 23
10
How to pick colums from a ragged array?
I have a large dataset (~1 million rows) of three variables: ID (patient's name), DATE (of appointment) and DIAGNOSIS (given on that date). Patients may have been assigned more than one diagnosis at any one appointment - leading to two rows, same ID and DATE but different DIAGNOSIS. The diagnoses may change between appointments. I want to subset the data in two ways: - define groups
2012 Feb 02
1
Writing out data
What is the best way to write out comma separated data, as a program is running (rather than waiting to the end using write.csv)? At the moment I'm doing this, but I guess it's not the most efficient. The data is in a column in the matrix postcount, and I'm using a loop to write out each of the 100 elements. for (j in 1:100) { cat(postcount[1,j], ",", file=filename,
2005 Jul 11
3
misc3d package
Hi, I am trying to install the misc3d package on a Windows (XP) installation of R 2.0.1 using install.packages("misc3d") but with no success. I have used this approach with other packages OK, but for misc3d I get the following output... trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 27996 bytes
2010 Nov 17
3
translate vector of numbers to indicies of 0/1 matrix
Hello All, Searched around, haven't found a decent solution. I'd like to translate a vector of numbers to a matrix (or to a list of vectors) such that the vector values would serve as indicies of the 1's in an otherwise-zero-filled matrix (or list of vectors). For example: > a = c(1,3,3,4) # perform operation [,1] [,2] [,3] [,4] [1,] 1 0 0 0 [2,] 0 0 1
2003 May 12
1
Plotting expressions with indicies
Hello, I would like to plot a series of math symbols on a graph with ordered indicies : expression(delta[1]) expression(delta[2]) etc. Is there a mean to write this in a for loop ? for(i in 1:6) text(i,i,expression(delta[i])) does not work ('i' is not evaluated). Thanks in advance, Y. Noel
2011 Feb 26
0
Weird behavior of a 2-by-2 matrix indicies
The real weird thing is I wrote "weird" and it comes out "wired"... The background is that I did a lot of sparse matrices calculations. Therefore need some indices tweaks, e.g subtract a block from a big matrix. Then I just create an indicies matrix and use it directly as a vector since a matrix is just a vector with dimensions attributed in R. I know I can convert them to a
2010 Sep 25
11
[Bug 30370] New: Nouveau module crashes with "divide error"
https://bugs.freedesktop.org/show_bug.cgi?id=30370 Summary: Nouveau module crashes with "divide error" Product: xorg Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: critical Priority: medium Component: Driver/nouveau AssignedTo: nouveau at