[R] Fw: " PROBLEM SOLVED" - Error with function

2013-04-22 Thread Katherine Gobin
Dear R forum Please refer to my query captioned Error with function. I had missed in bracket ")" in the return statement and hence I was getting the error. I has struggled for more than 2 hours to find out the problem and only then has posted to the forum. I sincerely apologize to all for consu

[R] Questions on function "readNamedRegionFromFile" in XLConnect pacakge

2013-04-22 Thread jpm miao
Hi, I have two questions on the function "readNamedRegionFromFile" in XLConnect pacakge. 1. In the documentation, # multiregion xlsx file from demoFiles subfolder of package XLConnect demoExcelFile <- system.file("demoFiles/multiregion.xlsx", package = "XLConn

[R] Fw: Error with function - USING library(plyr)

2013-04-22 Thread Katherine Gobin
Dear R forum, Please refer to my query regarding "Error with function". I forgot to mention that I am using "plyr" library. Sorry for inconvenience. Regards Katherine --- On Tue, 23/4/13, Katherine Gobin wrote: From: Katherine Gobin Subject: [R] Error with function To: r-help@r-project.

[R] Error with function

2013-04-22 Thread Katherine Gobin
Dear R forum, I have a data.frame as given below: df = data.frame(tran = c("tran1", "tran2", "tran3", "tran4"), tenor = c("2w", "1m", "7m", "3m"))  Also, I define libor_tenor_labels = as.character(c("o_n", "1w", "2w", "1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m", "11m", "12m"

Re: [R] Hmisc & pdflatex

2013-04-22 Thread Duncan Mackay
Hi I have come late to the discussion how about trying ? texi2dvi for pdf or dvi eg texi2dvi("D:/Cic/Sweave/Figs/Sheep3/FS/15/sFSheepFS15.tex", pdf = TRUE, clean = TRUE) Version R version 3.0.0 (2013-04-03), i386-w64-mingw32 Win 7 I made an environmental variable for Miktex in Windows or it

Re: [R] Frustration to get help R users group

2013-04-22 Thread Jeff Newmiller
This is dangerously close to a statistics theory question, which would be off-topic on this list. In any event, your example is definitely not reproducible (no sample data) [1]. Now might also be a good opportunity for you to read the Posting Guide mentioned at the bottom of every message on thi

[R] Frustration to get help R users group

2013-04-22 Thread Champak Ishram
Dear R users/developers I requested help to solve the problem of formulating Multivariate Sample selection model by using Full Information Maximum Likelihood (FIML)estimation method. I could not get any response. I formulated the following code of FIML to analyse univariate sample selection proble

Re: [R] Tables package - remove NAs and NaN

2013-04-22 Thread David Winsemius
On Apr 22, 2013, at 5:49 PM, Santosh wrote: > Dear Rxperts, > q <- data.frame(p=rep(c("A","B"),each=10,len=30), > a=rep(c(1,2,3),each=10),id=seq(30), > b=round(runif(30,10,20)), > c=round(runif(30,40,70))) > The operation below... > tabular(((p=factor(p))*(a=factor(a))+1) ~ (N = 1) + (b + c)* > (

[R] Meijer G-function

2013-04-22 Thread Sachinthaka Abeywardana
Hi All, Does anyone know if there is an implementation of the G-function in R. If so please let me know (could not find this on google). Thanks, Sachin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.eth

[R] Tables package - remove NAs and NaN

2013-04-22 Thread Santosh
Dear Rxperts, q <- data.frame(p=rep(c("A","B"),each=10,len=30), a=rep(c(1,2,3),each=10),id=seq(30), b=round(runif(30,10,20)), c=round(runif(30,40,70))) The operation below... tabular(((p=factor(p))*(a=factor(a))+1) ~ (N = 1) + (b + c)* (mean+sd),data=q) yields some rows of NAs and NaN as shown belo

Re: [R] Hmisc & pdflatex

2013-04-22 Thread Santosh
Dear Rxperts.. The problem of latex looking for "tex" and "dvi" files in a "TEMP" folder still persists. As a work around, I changed the options.. options(latexcmd="pdflatex",dviExtension="pdf") After the above change, latex(,file="a1") seems to work but the resulting pdf file is something

Re: [R] subset dataframe

2013-04-22 Thread Mihai Nica
Thanks Arun, Jorge,s idea worked... I can't believe I lost so much time with this...   mike > > From:arun >To: Mihai Nica >Cc: R help >Sent: Monday, April 22, 2013 4:57 PM >Subject:Re: [R] subset dataframe > > >HI, >Could you provide an example dataset? >

Re: [R] Vector with zeros and ones

2013-04-22 Thread Marc Schwartz
On Apr 22, 2013, at 6:28 PM, Marc Schwartz wrote: > On Apr 22, 2013, at 6:21 PM, Ayyappa wrote: > >> Dear group, >> >> I want to generate a vector of 10 elements that always has 20% zeroes, but >> with a random ordering of zeroes and ones. Can you please suggest a function >> to do that in

Re: [R] Vector with zeros and ones

2013-04-22 Thread Marc Schwartz
On Apr 22, 2013, at 6:21 PM, Ayyappa wrote: > Dear group, > > I want to generate a vector of 10 elements that always has 20% zeroes, but > with a random ordering of zeroes and ones. Can you please suggest a function > to do that in R? I tried 'sample' function but the 20% zeros was not always

Re: [R] Vector with zeros and ones

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 7:21 PM, Ayyappa wrote: > Dear group, > > I want to generate a vector of 10 elements that always has 20% zeroes, but > with a random ordering of zeroes and ones. Can you please suggest a function > to do that in R? I tried 'sample' function but the 20% zeros was not alway

[R] Vector with zeros and ones

2013-04-22 Thread Ayyappa
Dear group, I want to generate a vector of 10 elements that always has 20% zeroes, but with a random ordering of zeroes and ones. Can you please suggest a function to do that in R? I tried 'sample' function but the 20% zeros was not always guaranteed. Thanks for your help. Regards, Ayyappa

Re: [R] subset dataframe

2013-04-22 Thread arun
Hi, Just noticed that there is a space after "Angola " $ X    : Factor w/ 39 levels "Angola ", If that is the case: set.seed(15)  agoa<- data.frame(X.1=rep(c("AGOA ","GSP","CST"),3),X1996= sample(1:2,9,replace=TRUE),X2000=sample(40:3,9,replace=TRUE))   subset(agoa,X.1=="AGOA") #[1] X.1  

Re: [R] subset dataframe

2013-04-22 Thread arun
HI, Could you provide an example dataset? set.seed(15) agoa<- data.frame(X.1=rep(c("AGOA","GSP","CST"),3),X1996= sample(1:2,9,replace=TRUE),X2000=sample(40:3,9,replace=TRUE))  str(agoa) #'data.frame':    9 obs. of  3 variables: # $ X.1  : Factor w/ 3 levels "AGOA","CST","GSP": 1 3 2 1 3 2

Re: [R] R not loading

2013-04-22 Thread Peter Langfelder
On Mon, Apr 22, 2013 at 1:15 PM, Barbour, Russell wrote: > I am having a problem with loading R on my 64 bit computer. It used to > load perfectly until I upgraded to R 3.0.0 now it takes about 10 to even > 20 minutes ? Does anyone know how to remedy this problem? Did R-3.0.0 ever loa

Re: [R] R not loading

2013-04-22 Thread Michael Weylandt
On Apr 22, 2013, at 21:15, "Barbour, Russell" wrote: > I am having a problem with loading R on my 64 bit computer. It used to > load perfectly until I upgraded to R 3.0.0 now it takes about 10 to even > 20 minutes ? Does anyone know how to remedy this problem? > OS and install inf

Re: [R] Scatterplot and Causality

2013-04-22 Thread Belmont, John W
See bayes.cs.ucla.edu/jp_home.html for interesting insights -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rolf Turner Sent: Monday, April 22, 2013 4:52 PM To: Bert Gunter Cc: r-h...@stat.math.ethz.ch; Achim Zeileis Subject: R

Re: [R] Scatterplot and Causality

2013-04-22 Thread Rolf Turner
Fortune nomination. cheers, Rolf On 23/04/13 08:31, Bert Gunter wrote: (In response to a question about inferring causality from observational data.) As others have said: (Short answer) No. (Long Answer) Don't be ridiculous. _

Re: [R] subset dataframe

2013-04-22 Thread Jorge I Velez
Mike, You need subset(agoa, agoa$X.1 == "AGOA ") instead of subset(agoa, agoa$X.1 == "AGOA") (note the space after the last A in "AGOA". HTH, Jorge.- On Tue, Apr 23, 2013 at 7:14 AM, Mihai Nica wrote: > I can't understand what is happening. This is the code and results: > > > agoa <- read

[R] subset dataframe

2013-04-22 Thread Mihai Nica
I can't understand what is happening. This is the code and results: > agoa <- read.table(file = >"C:/Users/HTPC/Documents/_Documents/Research/WithDidia/AGOAUSImports.txt", >header = T, sep = "\t", dec = ".", na.strings = "NA", stringsAsFactors = T)# > str(agoa); names(agoa) 'data.frame':10

[R] Copula fitMdvc:

2013-04-22 Thread Elisa Taveras Pena
Hello, I am trying to do a fit a loglikelihood function with Multivariate distribution via copulas with fitMdvc. The problem is that it doesn't recognize that my beta is a vector of km parameter and when I try to run it it say that the length of my initial values is not the same as the parameter.

Re: [R] RODBC --How do you set up the connection so pwd is blank but driver-specific data source dialog box pops up after

2013-04-22 Thread Daniel J. Robertson
The password window popup apparently doesn't yet work with RStudio: e.g., http://support.rstudio.org/help/discussions/problems/4371-rodbc-connection-issue -- Daniel Robertson Senior Research and Planning Associate Institutional Research and Planning Cornell University / irp.cornell.edu -O

Re: [R] Print occurrence / positions of words

2013-04-22 Thread arun
Hi, May be this helps: vec<- "this is a nice text with nice characters" library(stringr)  vec2<-unlist(str_match_all(vec,"\\w+")) #or # vec2<-str_split(vec," ")[[1]] res<-unique(lapply(vec2,function(x) which(!is.na(match(vec2,x)  names(res)<- unique(vec2) res #$this #[1] 1 # #$is #[1] 2 # #$

[R] R not loading

2013-04-22 Thread Barbour, Russell
I am having a problem with loading R on my 64 bit computer. It used to load perfectly until I upgraded to R 3.0.0 now it takes about 10 to even 20 minutes ? Does anyone know how to remedy this problem? Russell " Skip" Barbour Ph.D. Associate Director for Statistics Center for Interdis

Re: [R] RODBC --How do you set up the connection so pwd is blank but driver-specific data source dialog box pops up after

2013-04-22 Thread Lopez, Dan
Daniel, Thanks for letting me know. I'll try it w/o Rstudio if needed. Thanks. Dan -Original Message- From: Daniel J. Robertson [mailto:dj...@cornell.edu] Sent: Monday, April 22, 2013 1:51 PM To: Lopez, Dan; R help (r-help@r-project.org) Subject: RE: [R] RODBC --How do you set up the c

Re: [R] Scatterplot and Causality

2013-04-22 Thread Joerg Luedicke
Nevertheless, some people try: http://www.kaggle.com/c/cause-effect-pairs Joerg On Mon, Apr 22, 2013 at 4:31 PM, Bert Gunter wrote: > Inline. > > > On Mon, Apr 22, 2013 at 1:15 PM, Lorenzo Isella > wrote: >> On Mon, 22 Apr 2013 17:27:05 +0200, Robert Baer wrote: >> >> >>> It strikes me that

[R] RODBC --How do you set up the connection so pwd is blank but driver-specific data source dialog box pops up after

2013-04-22 Thread Lopez, Dan
Hello, I want to leave pwd blank (to comply w/ company security protocol) and just be prompted by the driver-specific data source dialog box to enter the password after. But for some reason it is not working. R Version: "R version 2.15.1 (2012-06-22)" R Studio Version: 0.97.312 OS: Windows 7

Re: [R] Scatterplot and Causality

2013-04-22 Thread Bert Gunter
Inline. On Mon, Apr 22, 2013 at 1:15 PM, Lorenzo Isella wrote: > On Mon, 22 Apr 2013 17:27:05 +0200, Robert Baer wrote: > > >> It strikes me that this is not a particularly productive approach to >> causality, particularly in an observational setting. You would need to >> design an experiment

Re: [R] Hmisc & pdflatex

2013-04-22 Thread Santosh
Dear expeRts! Thanks for suggestions about getting MiKTeX... I have that installed.. The Sys.getenv("PATH") also reflects the path of "pdflatex".. I noticed that the function creates ".dvi", ".aux" files in the "current working directory but looks for these files in Sys.getenv("TEMP") folder. Is t

Re: [R] Scatterplot and Causality

2013-04-22 Thread Lorenzo Isella
On Mon, 22 Apr 2013 17:27:05 +0200, Robert Baer wrote: It strikes me that this is not a particularly productive approach to causality, particularly in an observational setting. You would need to design an experiment where you had a known manipulation of an explanatory variable and studie

[R] ggplot-display text in bar chart

2013-04-22 Thread Ye Lin
I want to show counts value on stacked bar chart in ggplot2. I found similar question here http://stackoverflow.com/questions/6644997/showing-data-values-on-stacked-bar-chart-in-ggplot2 but that one shows value instead of counts. My data frame(dat1) is sth like this: Group Length Width 1

Re: [R] More

2013-04-22 Thread arun
Hi Bruce, This could be also done by: dat1<- read.csv("Sample_all_3_locations.csv",header=TRUE,stringsAsFactors=FALSE,sep=",") library(plyr) res1<-ddply(unique(dat1[,c(1,3:4)]),.(Location_name),summarize,Survey_Time=sum(Survey_Time)) #changed here res1 #  Location_name Survey_Time #1 1_f3p1_

Re: [R] More

2013-04-22 Thread arun
Hi Bruce, >From your excel sheets, it looks like for the step1, you were just taking only >the "Survey Time" of the first rows of unique Start_Day for each >Location_name. Step2 results looks the same as "res2" If this is the case: dat1<- read.csv("Sample_all_3_locations.csv",header=TRUE,str

Re: [R] how to import several files every day

2013-04-22 Thread Greg Snow
Jim Lemon showed one option of keeping a list of the files that have already been processed and comparing to this list to see which files are new. Here are a couple of other possibilities: You could move a file from the input folder to an archive folder after processing it (file.rename or system

Re: [R] Reshape or Plyr?

2013-04-22 Thread Law, Jason
Hi Bruce, I work with a lot of similar data and have to do these types of things quite often. I find it helps to keep to vectorized code as much as possible. That is, do as many of the calculations as possible outside of the aggregation code. Here's one way: library(reshape2) # stick to a v

Re: [R] Sensitivity Analysis

2013-04-22 Thread Gilson Carvalho
Hi all, Do nnet, neuralnet or RSNNS implemented any kind of sensitivity analysis? Best Wishes, Em 22 de abril de 2013 11:46, Gilson Carvalho escreveu: > Hi all, > > Do nnet, neuralnet or RSNNS implemented any kind of sensitivity analysis? > > Best Wishes, > > -- > Prof. Gilson Correia de Carva

Re: [R] odfWeave: Some questions about potential formatting options

2013-04-22 Thread Paul Miller
Hi Milan and Max,   Thanks for your most recent replies. I wasn't able to sucessfully implement any of your proposed solutions, but am not overly worried about it. For example, I found that I could not get the Greek letter chi into my table footnotes via odfCat using unicode or escape codes (I t

Re: [R] extracting the diagonal of an inverse matrix

2013-04-22 Thread William Dunlap
You could save the space required to store the inverse of A by repeating solve(A,column) for each column of an identity matrix the size of A, and store just the relevant element of the result. E.g., > diag(solve(A)) [1] 0.39576620 0.12064108 0.20705171 0.10067892 0.03191425 0.05857497 0.107494

Re: [R] Scatterplot and Causality

2013-04-22 Thread Robert Baer
On 4/22/2013 9:48 AM, Lorenzo Isella wrote: Dear All, I hope this is not too off topic. I am given a set of scatteplots (nothing too fancy; think about a normal x-y 2D plot). I do not deal with two time series (indeed I have no info about time). If I call A=(A1,A2,...) and B=(B1, B2, ...) the 2 v

Re: [R] Scatterplot and Causality

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 3:48 PM, Lorenzo Isella wrote: > Dear All, > I hope this is not too off topic. > I am given a set of scatteplots (nothing too fancy; think about a > normal x-y 2D plot). > I do not deal with two time series (indeed I have no info about time). > If I call A=(A1,A2,...) and B

Re: [R] Scatterplot and Causality

2013-04-22 Thread Duncan Murdoch
On 22/04/2013 10:48 AM, Lorenzo Isella wrote: Dear All, I hope this is not too off topic. I am given a set of scatteplots (nothing too fancy; think about a normal x-y 2D plot). I do not deal with two time series (indeed I have no info about time). If I call A=(A1,A2,...) and B=(B1, B2, ...) the 2

Re: [R] numerical integration of a bivariate function

2013-04-22 Thread Berend Hasselman
On 22-04-2013, at 15:04, Hicham Mezouara wrote: > > hello > I work on > the probabilities of bivariate normal distribution. I need > integrate the > following function. > f (x, y) = exp [- (x ^ 2 + y ^ 2 + x * y)] with - ∞ ≤ x ≤ > 7.44 and - ∞ ≤ y ≤ 1.44 , either software R or matlab Versio

[R] Scatterplot and Causality

2013-04-22 Thread Lorenzo Isella
Dear All, I hope this is not too off topic. I am given a set of scatteplots (nothing too fancy; think about a normal x-y 2D plot). I do not deal with two time series (indeed I have no info about time). If I call A=(A1,A2,...) and B=(B1, B2, ...) the 2 variables (two vectors of numbers most of the c

[R] Sensitivity Analysis

2013-04-22 Thread Gilson Carvalho
Hi all, Do nnet, neuralnet or RSNNS implemented any kind of sensitivity analysis? Best Wishes, -- Prof. Gilson Correia de Carvalho, M.Sc. Pesquisador Associado Laboratório de Ecologia Bentônica - LEB Instituto de Biologia - UFBA Universidade

Re: [R] Hmisc & pdflatex

2013-04-22 Thread Duncan Murdoch
On 22/04/2013 10:34 AM, Santosh wrote: Dear Rxperts, Apologize for posting it to a wrong thread..Hence, the re-post... I am trying to use pdflatex from Hmisc, I get the error message. "pdflatex is not available"... The version of Hmisc is the latest one (got the warning that it was compiled unde

[R] Hmisc & pdflatex

2013-04-22 Thread Santosh
Dear Rxperts, Apologize for posting it to a wrong thread..Hence, the re-post... I am trying to use pdflatex from Hmisc, I get the error message. "pdflatex is not available"... The version of Hmisc is the latest one (got the warning that it was compiled under R version 2.15.3) . The version of R o

Re: [R] numerical integration of a bivariate function

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 2:04 PM, Hicham Mezouara wrote: > hello > I work on > the probabilities of bivariate normal distribution. I need > integrate the > following function. > f (x, y) = exp [- (x ^ 2 + y ^ 2 + x * y)] with - ∞ ≤ x ≤ > 7.44 and - ∞ ≤ y ≤ 1.44 , either software R or matlab Ver

[R] numerical integration of a bivariate function

2013-04-22 Thread Hicham Mezouara
hello I work on the probabilities of bivariate normal distribution. I need integrate  the following function. f (x, y) = exp [- (x ^ 2 + y ^ 2 + x * y)] with - ∞ ≤ x ≤ 7.44 and - ∞ ≤ y ≤ 1.44   , either software R or  matlab Version R 2009a Thank you for helping me Regards

[R] Multiple lon lat points in the map with ggplot2

2013-04-22 Thread Simonas Kecorius
Hello R users, For the last few days I am struggling with the following task: my data.frame: A1A2A3 B1 B2 B3 58.81 53.292 54.501 13.013 17.39 19.407 56.02 56.251 54.033 20.099 13.15 10.411 55.376 53.099 57.625 13.396 21.031 13

Re: [R] question

2013-04-22 Thread Roger Koenker
In quantreg if you do FAQ() item 4 is: 4. [R^2] "I am currently trying to caculate the coefficient of determination for different quantile regression models. For example, how do you calculate the the sum of the weighted absolute deviations in the models ..." R-squared is evil,

Re: [R] How to set frequncy?

2013-04-22 Thread Rui Barradas
Hello, You've not Cc'ed the list If you keep the discussion on the list, you'll have more and better answers. See the post by Michael Weylandt for a more complete answer to your question. Rui Barradas Em 22-04-2013 12:16, Lizhu Ren escreveu: > thanks for u replying, > i think in setting frequenc

Re: [R] How to set frequncy?

2013-04-22 Thread R. Michael Weylandt
On Mon, Apr 22, 2013 at 9:54 AM, Rui Barradas wrote: > Hello, > > If stock prices are daily data, use frequency = 1. > Err, maybe... The frequency attribute for a "ts" class time series is somewhat subtle. It's the amount of observations per seasonal period / relevant cycle, where relevant is a

Re: [R] Rattle for R-3.0.0?

2013-04-22 Thread Duncan Murdoch
On 13-04-22 2:18 AM, Казахстанский филиал МГУ им.Ломоносова wrote: To Whom It May Concern, When trying to install Rattle for R-3.0.0 we get a message "package ‘rattle’ is not available (for R version 2.14.1)" It is available for R 3.0.0. It looks like you were running 2.14.1 when you tried t

Re: [R] how to import several files every day

2013-04-22 Thread Jim Lemon
On 04/22/2013 09:00 PM, Martin Lavoie wrote: Hi Jim actually I did not underscore my code. I just copied and pasted the original code you suggested. but here is what I have on my system (I tried with csv files if I would get a different result): # setwd("~/Desktop/folder/") system("echo xxx > o

Re: [R] how to import several files every day

2013-04-22 Thread Martin Lavoie
Hi Jim actually I did not underscore my code. I just copied and pasted the original code you suggested. but here is what I have on my system (I tried with csv files if I would get a different result): # setwd("~/Desktop/folder/") system("echo xxx > old.filenames.tab") all.filenames<-list.files(pa

[R] Plot fail with dbscan (package fpc) and dataset with only noise

2013-04-22 Thread Forconi
Hi, I'm using the clustering package 'fpc' to make some test with the dbscan algorithm. The commands I'm using are rather simple: csvdata <- read.table("C:/file.csv", header = TRUE) dataset <- csvdata[,c('D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7')] ds <- dbscan(dataset, 0.15, MinPts = 10)

[R] Rattle for R-3.0.0?

2013-04-22 Thread Казахстанский филиал МГУ им . Ломоносова
To Whom It May Concern, When trying to install Rattle for R-3.0.0 we get a message "package ‘rattle’ is not available (for R version 2.14.1)" The same message we get when we try to install Rattle for earlier versions of R. Would you be so kind to let us know how to overcome the problem? Many th

[R] question

2013-04-22 Thread nafiseh hagiaghamohammadi
Hi Does anyone know if there is a method to calculate a goodness-of-fit statistic for quantile regressions with package quantreg? Tanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

Re: [R] cluster gene list

2013-04-22 Thread Catarina Maia
Hello, I'm just a beginner and probably there is a better way to do it but here it goes: #cluster analysis Euclidean_Distance <- dist(mydata, method="euclidean", diag=FALSE , upper=FALSE, p=2) data <- hclust(Euclidean_Distance, method="ward", members=NULL) plot(data,hang=-1) #K=4 # i chose to

Re: [R] R CMD build

2013-04-22 Thread Knut Krueger
Am 21.04.2013 04:59, schrieb Gabor Grothendieck: That is correct but if one were using the batchfiles I mentioned then both work. -- Statistics & Batch files? I can find only xls2csv.bat and RunSnowWorker.bat in the 3.0 directories. Knut __ R-h

Re: [R] R CMD build

2013-04-22 Thread Knut Krueger
Am 21.04.2013 04:14, schrieb Henrik Bengtsson: FYI, R CMD build ... works just fine on Windows (and I'm sure R cmd build ... won't). /Henrik Yes it works, unfortunately windows user need not consider capitals or not. When sitting on a Windows PC I usually typing lower cas only on Linux I am a

Re: [R] How to set frequncy?

2013-04-22 Thread Rui Barradas
Hello, If stock prices are daily data, use frequency = 1. Hope this helps, Rui Barradas Em 21-04-2013 14:22, Lizhu Ren escreveu: Hi Boss, i have data of one stock price from 2 January 2006 to 31 December 2012.But each year had different markert day, I want to calculate daily returns and d

Re: [R] extracting the diagonal of an inverse matrix

2013-04-22 Thread Camarda, Carlo Giovanni
Dear Greg, thanks a lot for your prompt reply. I was aware of the link and the associated papers. In my previous mail I was wondering whether there was already an R-routine for coping with this issue. I add below a testable example which reproduces my problem. Thanks again, Giancarlo ## dime

Re: [R] how to import several files every day

2013-04-22 Thread Jim Lemon
On 04/22/2013 10:14 AM, Martin Lavoie wrote: Hi Jim thanks for the help. I think I understand all the steps you suggested. I tried an example with your code but there is something not working I think. See below. all.filenames<-list.files(__path="pathtofile", full.names=TRUE) /#this step works/