Skip to content

Search Archives

Search tips
from:Name Search by author name, e.g. from:Duncan Murdoch "exact phrase" Match an exact phrase word1 word2 Match messages containing both words Date range Use the date pickers to filter results to a time period

Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.

57 results for “from:Stefan Petersson”

Password protected R Repository
Stefan Petersson · Sep 28, 2011 · r-help

Prof Brian Ripley <ripley <at> stats.ox.ac.uk> writes: > > Who said that RCurl::getURL worked with install.packages? > (At least, I assume this is from RCurl: you did not mention it.) > > install.packages() first calls available.packages(), and that...

Dynamically build variable names
Stefan Petersson · May 17, 2010 · r-help

I'm trying to dynamically build variable names to use on a list. Let's say I have a list like this one: l <- list(V1_1=c(1,2,3), V1_2=c('One','Two','Three')) And I succesfully...

Executable for Production Use
Stefan Petersson · Mar 8, 2010 · r-help

Ma Ismail - NewYork-MEAG-NY <ima <at> meag-ny.com> writes: > > Hi, > > A few of the developers on our Quant team are using R for data calculation andto generate a resulting CSV file. They have R installed on their workstations...

Sum over indexed value
Stefan Petersson · Nov 16, 2009 · r-help

P=data.frame(x=c(1,1,2,3,2,1),y=rnorm(6)) tapply(P$y,P$x,sum) regards, stefan On Mon, Nov 16, 2009 at 09:49:17AM -0800, Gunadi wrote: > > I am sure this is easy...

Password protected R Repository
Stefan Petersson · Sep 28, 2011 · r-help

> >> > > > > The helpfiles for 'download.file' was not that helpful. But maybe it's just me > > not being able to read them correctly. > > Yes, looks like this is the case. > > > I tried to call install.packages with the 'method=wget', and...

Backslash in paste() function
Stefan Petersson · Jun 16, 2010 · r-help

Hi, I'm trying to build a vector of latex commands. However, I need the command strings to begin with a backslash "\". I have: test <- c('foo','bar') and I need to rebuild the array, encapsulating the text items with...

Parliament Seats Graph
Stefan Petersson · Sep 12, 2014 · r-help

Yes. That's correct. The main problem is to solve a matrix where the colSums and rowSums are known. Credits to dwinsemius at comcast.net for pointing out the function "r2dtable" to me. Just feed it with the known margins...

Margins to fill matrix
Stefan Petersson · Sep 11, 2014 · r-help

I have : rs <- c(3, 2, 3, 4) cs <- c(4, 5, 3) And want: > matrix [,1] [,2] [,3] [1,] 1 2 0 [2,] 1 0 1 [3,] 1 1 1 [4,] 1 2 1 The rowSums in the above...

Combining all possible values of variables into a new...
Stefan Petersson · Oct 20, 2008 · r-help

I'm trying to create a new column in my data.frame where subjects are categorized depending on values on four other columns. In any other case I would just nest a few ifelse statements, however, in this case i...

Backslash in paste() function
Stefan Petersson · Jun 16, 2010 · r-help

> > Just double all the backslashes and you are fine. > In order to see the outcome, use cat() (not print). > > Uwe Ligges > > On 16.06.2010 09:49, Stefan Petersson wrote: > > > > Hi, > > > > I'm trying to build a vector of latex...

Feature request for as.Date() function
Stefan Petersson · Nov 25, 2009 · r-help

hi, it fails, when the NA is surrounded by double quotes, which is the default way of quoting of the write.table command. x <- read.csv(textConnection('date,value + + 2009-01-01,10 + + 2009-02-01,1 + + "NA", 3'), colClasses...

Putting names on a ggplot
Stefan Petersson · Oct 18, 2009 · r-help

hello, On Sun, Oct 18, 2009 at 08:29:19AM -0700, John Kane wrote: > Thanks Stefan, the annotate approach works beautifully. I had not got > that far in Hadley's book apparently :( > > I'm not convinced though that the explaination...

Password protected R Repository
Stefan Petersson · Sep 28, 2011 · r-help

<stefan.petersson <at> inizio.se> writes: > > > Hi, > > I've set up a very simple R repository. Just a single source > library. Everything works fine. I can install the package on my client > using: > > install.packages(repos='http://www.myServer.se...

ggplot 'annotate problem' again.
Stefan Petersson · Feb 28, 2010 · r-help

Hi, I suggest to use geom_text to add multiple labels. Put all the information needed by for your labels in a dataframe: lab = data.frame(x=namposts+2.5, y = temprange[2], label= mlabs) and add them to the...

Two matrix loop
Stefan Petersson · Mar 24, 2011 · r-help

Hi, I'm trying to create a distance matrix. And it works out somewhat ok. However, I suspect that there are some efficiency issues with my efforts. Plz have a look at this: donor <- matrix(c(3,1,2,3...

Margins to fill matrix
Stefan Petersson · Sep 11, 2014 · r-help

Yes! That's excactly what I need. Thank You so much! Den 11 sep 2014 21:20 skrev "David L Carlson" <dcarlson at tamu.edu>: > You want r2dtable(): > > > ?r2dtable > > set.seed(42) > > a <- r2dtable(1, seats, mandates) > addmargins(a[[1...

Error results from MS Access via RODBC
Stefan Petersson · Sep 24, 2008 · r-help

I have an MS Access database with one table and one column holding rep(1:10) I use: library(RODBC) channel <- odbcConnect("test") sqlQuery(channel, paste("SELECT col FROM tblTest"), believeNRows=FALSE) and get: 49 50 51 52 53 54...

Can't find what you're looking for? Try searching with Google .