Re: [R] use of names() within lapply()

2013-04-17 Thread Ivan Alves
Dear Duncan and A.K. Many thanks for your super quick help. The modified lapply did the trick, mapply died with a error "Error in dots[[2L]][[1L]] : object of type 'builtin' is not subsettable". Kind regards, Ivan On 17 Apr 2013, at 17:12, Duncan Murdoch wrote: > On 17

[R] use of names() within lapply()

2013-04-17 Thread Ivan Alves
Dear all, List g has 2 elements > names(g) [1] "2009-10-07" "2012-02-29" and the list plot lapply(g, plot, main=names(g)) results in equal plot titles with both list names, whereas distinct titles names(g[1]) and names(g[2]) are sought. Clearly, lapply is passing 'g' in stead of consecutivel

[R] recursive function on a structured list of lists (dendrogram)

2012-10-24 Thread Ivan Alves
Dear all, I have been trying the following without avail and would be very grateful for any help. From a dendrogram (recursive list of lists with some structure), I would like to obtain some information of the component lists and of the enclosing list at the same time. In dendrogram-speech I

Re: [R] 2 (related) problems with RODBC in 64 bit Windows

2012-08-29 Thread Ivan Alves
this as a problem of implementation on 64 bit. On 2, many thanks, once I gather the courage to address Prof. Ripley I will send him a recollection of my experience. Kind regards, Ivan On 29 Aug 2012, at 15:08, Uwe Ligges wrote: > > > On 24.08.2012 21:53, Ivan Alves wrote: >>

[R] 2 (related) problems with RODBC in 64 bit Windows

2012-08-24 Thread Ivan Alves
Hi all, I am encountering an RODBC problem in R 2.15.1 in windows 64 bit which I do not encountered in the same set up in windows 32 bit (the latest binary version of RODBC in both cases from the same depository gotten by install.packages(‘RODBC’), Oracle ODBC client software installed in 64 an

Re: [R] Graph in R with edge weights

2010-12-01 Thread Ivan Alves
Hi Arthur, I was asking the same thing and came across the following (your need the "sna" library). http://students.washington.edu/mclarkso/documents/gplot%20Ver2.pdf Take a look at the edge.lwd and vertex.cex examples of the function gplot. You can use vectors for the different nodes. Kind r

Re: [R] ggplot2 adding vertical line at a certain date

2009-05-28 Thread Ivan Alves
check out geom_vline + geom_vline(xintercept=as.numeric(as.Date("2002-11-01"))) [you may not need to convert the date to numeric in the most recent ggplot2 version] On 27 May 2009, at 20:31, stephen sefick wrote: library(ggplot2) melt.updn <- (structure(list(date = structure(c(11808, 118

Re: [R] data frames with å, ä, and ö (=n on-ASCII-characters) from windows to mac os x

2009-01-16 Thread Ivan Alves
Hi, On my system (see below), it works fine (inputing the code below at the R prompt). Make sure that the encoding of the input file is encoded UTF-8. Rgds, Ivan > sessionInfo() R version 2.8.1 Patched (2009-01-14 r47602) i386-apple-darwin9.6.0 locale: en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.

[R] Treatment of Date ODBC objects in R (RODBC)

2008-12-22 Thread Ivan Alves
Dear all, Retrieving an Oracle "Date" data type by means of RODBC (version 1.2-4) I get different classes in R depending on which operating system I am in: On MacOSX I get "Date" class On Windows I get " "POSIXt" "POSIXct" class The problem is material, as converting the "POSIXt" "POSIXct"

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
Many thanks to all for their help. Factors are indeed very tricky and sided on the conversion to character. Kind regards, Ivan On 22 Oct 2008, at 19:01, Duncan Murdoch wrote: On 10/22/2008 12:09 PM, Ivan Alves wrote: Dear all, Thanks for all the replies. I get something with Duncan's

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
urther guidance? Kind regards, Ivan On 22 Oct 2008, at 17:26, Duncan Murdoch wrote: On 10/22/2008 11:21 AM, Ivan Alves wrote: Dear all, I searched the mail archives and the R site and found no guidance (tried "merge", "cbind" and terms like "coalesce" with no s

[R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
Dear all, I searched the mail archives and the R site and found no guidance (tried "merge", "cbind" and terms like "coalesce" with no success). There surely is a way to coalesce (like in SQL) columns in a dataframe, right? For example, I would like to go from a dataframe with two column

Re: [R] aggregating along bins and bin-quantiles

2008-10-22 Thread Ivan Alves
UE)) aggregate(.df$value,list(DATE=.df$Date,QUANTILE=.df$quantile),sum) }) # CHECK IF IT WORKED print(tempresult) # RBIBND EVERYTHING BACK TOGETHER # SO THAT IT"S ONE DATAFRAME finalresult <- do.call(rbind,tempresult) print(finalresult) On Tue, Oct 21, 2008 at 5:47 PM, Ivan Alves wrot

Re: [R] aggregating along bins and bin-quantiles

2008-10-21 Thread Ivan Alves
sing. 'dput' will create an easily readable format for posting your data (much easier than if you post the listing of a table). Usually it is some 'type mismatch' which says you really have to have the data to run the script against. On Mon, Oct 20, 2008 at 6:38 PM, Ivan

Re: [R] aggregating along bins and bin-quantiles

2008-10-20 Thread Ivan Alves
Apologies, just a typo in the first instruction (when translating the names), the question is still valid On 21 Oct 2008, at 00:38, Ivan Alves wrote: Dear all, I would like to aggregate a data frame (consisting of 2 columns - one for the bins, say factors, and one for the values) along bins

[R] aggregating along bins and bin-quantiles

2008-10-20 Thread Ivan Alves
. If not, can you give me some guidance as to what I am doing wrong and how I can solve the sort/list issue? Any help would be greatly appreciated Kind regards, Ivan Alves [[alternative HTML version deleted]] __ R-help@r-project.org mai