search for: djnordlund

Displaying 20 results from an estimated 39 matches for "djnordlund".

2012 Jul 27
2
How can I access an element of a string?
Dear Daniel and Jorge, Thank you very much and it does help. If I have a string "ABCD", how can I access the second element of the string "B"? Thanks, Miao 2012/7/27 Daniel Nordlund <djnordlund@frontier.com> > > -----Original Message----- > > From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org] > > On Behalf Of jpm miao > > Sent: Thursday, July 26, 2012 9:12 PM > > To: r-help > > Subject: [R] How can I access the title of a table...
2004 May 22
2
How to define specific location of tick marks in plot()
Hi, I wish to create a series of plots with the same x-axis range and the same placement of tick marks. In addition I want to force the tick marks to be at specific locations. For example, if I wish to have an x-axis which goes from 40 to 110, with tick marks at 40, 50, 60, ... , How can I accomplish that? The various parameters I have tried changing just seem to be suggestions for
2009 Aug 24
6
Combining matrices
If I have two matrices like x <- matrix(rep(c(1,2,3),3),3) y <- matrix(rep(c(4,5,6),3),3) How can I combine them to get ? 1 1 1 4 4 4 1 1 1 5 5 5 1 1 1 6 6 6 2 2 2 4 4 4 2 2 2 5 5 5 2 2 2 6 6 6 3 3 3 4 4 4 3 3 3 5 5 5 3 3 3 6 6 6 The number of rows and the actual numbers above are unimportant, they are given so as to illustrate how I want to combine the matrices. I.e., I am looking for
2003 Apr 18
2
Keyboard problem using RWin 1.7.0
I just installed RWin 1.7.0 on an Intel box running Win2000 Pro. If I try to paste from the clipboard to the console command line, the command(s) are executed, but the console then stops responding to the keyboard. The only way I have found to continue is to use the mouse to shut down R. Typing in the console works just fine; commands are executed, command-line editing is ok, source-ing
2012 Mar 23
4
Missing Windows binary for R-2.15RC?
Hi, The page http://cran.r-project.org/bin/windows/base/rtest.html has a link to: http://cran.r-project.org/bin/windows/base/R-2.15.0rc-win.exe However, clicking on that link gives a 404 "Object not found' error. FYI. Dan
2011 Feb 10
1
Revolution Analytics reading SAS datasets
Has anyone heard whether Revolution Analytics is going to release this capability to the R community? http://www.businesswire.com/news/home/20110201005852/en/Revolution-Analytics-Unlocks-SAS-Data Dan Daniel Nordlund Bothell, WA USA
2003 Apr 26
0
Re: [R] Keyboard problem using RWin 1.7.0 (PR#2798)
On Sun, 20 Apr 2003 00:57:18 +0200 (MET DST), DJNordlund@aol.com wrote: >Bug Description > > >At startup I get the standard information and prompt.... >If I then paste anything, even something as simple as the character "1" >(without quotes) to the command line, R stops responding to the keyboard. >The "1" i...
2009 Dec 18
2
how to combine multiple indicator variables in a single factor
Say I have a dataframe like this: df <- data.frame(cbind(c(1,0,0,1),c(0,1,0,0),c(0,0,1,0))) names(df) <- c('a','b','c') I would like to create a factor in a new column, where the factor values are taken from the column names, like this: > df2 a b c f 1 1 0 0 a 2 0 1 0 b 3 0 0 1 c 4 1 0 0 a How would I do this? Thanks, Dan Daniel Nordlund Bothell, WA USA
2013 Apr 18
2
Multiple Multivariate regression in R with 50 independent variables
Hello all Is there a method/package in R in which I can do regressions for more than 50 independent variables ? Regards The woods are lovely, dark and deep But I have promises to keep And miles before I go to sleep And miles before I go to sleep ----- [[alternative HTML version deleted]]
2018 Jan 30
0
Simulation based on runif to get mean
Hello, Right. Missed that one. Rui Barradas Enviado a partir do meu smartphone Samsung Galaxy.-------- Mensagem original --------De: Eric Berger <ericjberger at gmail.com> Data: 30/01/2018 10:12 (GMT+00:00) Para: Rui Barradas <ruipbarradas at sapo.pt> Cc: Daniel Nordlund <djnordlund at gmail.com>, smart hendsome <putra_autumn86 at yahoo.com>, r-help at r-project.org Assunto: Re: [R] Simulation based on runif to get mean Or a shorter version of Rui's approach: set.seed(2511)? ? # Make the results reproduciblefun <- function(n){? f <- function(){? ? c(mean(ru...
2018 May 08
0
Average of results coming from B=100 repetitions (looping)
On 5/8/2018 12:26 PM, varin sacha via R-help wrote: > > Dear R-experts, > > Here below the reproducible example. I am trying to get the average of the 100 results coming from the "lst" function. I have tried lst$mean and mean(lst). It does not work. > Any help would be highly appreciated > > #################### > > ?## R script for getting MedAe and
2018 May 22
2
Using tryCatch in a for loop
...wnames(new.regimeshift) <- colnames(y)[i] regimeshift <- rbind(regimeshift,new.regimeshift) print(regimeshift) }, error= function(e) {cat("Error", "\n")}, warning= function(w) {cat("Warning", "\n")}) } Bailey From: Daniel Nordlund <djnordlund at gmail.com> Sent: May 22, 2018 3:06 PM To: Bailey Hewitt; Bert Gunter Cc: r-help at R-project.org Subject: Re: [R] Using tryCatch in a for loop ? On 5/22/2018 11:32 AM, Bailey Hewitt wrote: > Hi Bert, > > Thank you for the quick response! > > In its current?state?the code?pr...
2018 Feb 02
0
command line fails
On 2/2/2018 4:52 AM, Michael Ashton wrote: > Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r window simply flashes and closes. > > There's probably a way to find out why rscript is failing,
2018 May 22
0
Using tryCatch in a for loop
On 5/22/2018 11:32 AM, Bailey Hewitt wrote: > Hi Bert, > > Thank you for the quick response! > > In its current?state?the code?prints three lines that say "warning". What I was expecting is that I would?get?a matrix with 4 columns, 1. column names (from the original data, ex. Lake1) 2. breakpoint year 3. slope 4. slope difference from the first to the?second segment of
2018 Feb 14
0
How to turn off warnings about class name conflicts
On 2/13/2018 11:47 PM, Ayhan yuksel wrote: > Hi, > > I am using two packages (quantmod and FRAPO) > > Quantmod and FRAPO both have a class names "zoo" > > R is displaying the following warning when I manipulate an object of class > zoo: > > Found more than one class "zoo" in cache; using the first, from namespace > 'quantmod' >
2018 May 22
0
Using tryCatch in a for loop
...egimeshift <- rbind(regimeshift,new.regimeshift) > print(regimeshift) > }, error= function(e) {cat("Error", "\n")}, > warning= function(w) {cat("Warning", "\n")}) > } > > Bailey > > > > > From: Daniel Nordlund <djnordlund at gmail.com> > Sent: May 22, 2018 3:06 PM > To: Bailey Hewitt; Bert Gunter > Cc: r-help at R-project.org > Subject: Re: [R] Using tryCatch in a for loop > > > On 5/22/2018 11:32 AM, Bailey Hewitt wrote: > > Hi Bert, > > > > Thank you for the quick response...
2018 May 22
4
Using tryCatch in a for loop
Hi Bert, Thank you for the quick response!? In its current?state?the code?prints three lines that say "warning". What I was expecting is that I would?get?a matrix with 4 columns, 1. column names (from the original data, ex. Lake1) 2. breakpoint year 3. slope 4. slope difference from the first to the?second segment of the segmented regression. Each row in the matrix would be the results
2018 Feb 14
2
How to turn off warnings about class name conflicts
Hi, I am using two packages (quantmod and FRAPO) Quantmod and FRAPO both have a class names "zoo" R is displaying the following warning when I manipulate an object of class zoo: Found more than one class "zoo" in cache; using the first, from namespace 'quantmod' Also defined by ?FRAPO? The warning is displayed every time I manipulate a zoo object and becomes pretty
2011 Aug 04
2
Efficient way of creating a shifted (lagged) variable?
Hello! I have a data set: set.seed(123) y<-data.frame(week=seq(as.Date("2010-01-03"), as.Date("2011-01-31"),by="week")) y$var1<-c(1,2,3,round(rnorm(54),1)) y$var2<-c(10,20,30,round(rnorm(54),1)) # All I need is to create lagged variables for var1 and var2. I looked around a bit and found several ways of doing it. They all seem quite complicated - while in
2010 Oct 09
4
same random numbers in different sessions
Dear all I'm using Xubuntu Lucid and I keep getting the same random numbers whenever I start a new session of R. For example, I keep getting > sample(1:1000, 1) [1] 87 or > rnorm(1:10) [1] -1.3618103 0.4241701 1.0720076 0.2208145 -0.5375314 -0.4846588 [7] 0.7576768 0.6527407 -0.6868786 0.8718527 I expected that some set.seed() instruction woudl be present in a config file in