Re: [R] Loading multiple packages with install.packages()...

2024-09-23 Thread Ben Bolker
quot;sandwich", "multcompView", "ggplot2", "stringr", "dplyr", "openxlsx", "tidyr") # Check and install each package lapply(packages, install_if_missing) Regards, Tim -Original Message----- From: R-help On Behalf Of Brian Lunergan Se

Re: [R] Loading multiple packages with install.packages()...

2024-09-23 Thread Bert Gunter
"multcomp", "sandwich", "multcompView", "ggplot2", > "stringr", "dplyr", "openxlsx", "tidyr") > # Check and install each package > lapply(packages, install_if_missing) > > > Regards, > Tim > -Or

Re: [R] Loading multiple packages with install.packages()...

2024-09-23 Thread Ebert,Timothy Aaron
Check and install each package lapply(packages, install_if_missing) Regards, Tim -Original Message- From: R-help On Behalf Of Brian Lunergan Sent: Monday, September 23, 2024 12:35 PM To: r-help@r-project.org Subject: [R] Loading multiple packages with install.packages()... [External Email] -

[R] Loading multiple packages with install.packages()...

2024-09-23 Thread Brian Lunergan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi folks: Curious question. I've added Rcmdr to my setup (R 4.4.1). I would like to add all of the plugins. Is there a way to get install.packages() to gather up everything starting 'rcmdrplugin', or do I have to list each package individually betwe

[R] Loading aliased file in MacOSX

2019-09-11 Thread Marc Girondot via R-help
If I try to load data from an alias file made using Cmd+Ctrl+A in finder for MacOSX, I get an error. Symbolic links are working well but sometimes, it is easier to use finder rather than terminal. Has someone a solution to help R to read the original aliased file ? Thanks Here is a reproducib

Re: [R] Loading large tar.gz XenaHub Data into R

2019-08-01 Thread Spencer Brackett
Thank you both for your advice! The z <- readLines(gzcon(url(" https://tcga.xenahubs.net/download/TCGA.GBMLGG.sampleMap/HumanMethylation450.gz";)), ) command worked out nicely On Thu, Aug 1, 2019 at 6:47 PM William Dunlap wrote: > By the way, instead of saying only that there were warnings, it w

Re: [R] Loading large tar.gz XenaHub Data into R

2019-08-01 Thread William Dunlap via R-help
By the way, instead of saying only that there were warnings, it would be nice to show some of them. E.g., > z <- readLines(" https://tcga.xenahubs.net/download/TCGA.GBMLGG.sampleMap/HumanMethylation450.gz ") [ Hit control-C or Esc to interrupt, or wait a long time ] There were 50 or more warnings

Re: [R] Loading large tar.gz XenaHub Data into R

2019-08-01 Thread Bert Gunter
These are gzipped files, I assume. So see ?gzfile and associated info for how to open a gzip connection and read from it. You may also prefer to search (e.g. at rseek.org) on "read a gzipped file" or similar for possible alternatives. Of course, if they're not gzipped files, then ignore the above.

[R] Loading large tar.gz XenaHub Data into R

2019-08-01 Thread Spencer Brackett
Good evening, I am attempting to load the following Xena dataset https://tcga.xenahubs.net/download/TCGA.GBMLGG.sampleMap/HumanMethylation450.gz I am trying to unpack the dataset and read it into R as a table, but due to the size of the file, I am having some trouble. The following are the comman

[R] Loading EDF files

2019-05-03 Thread Marcelo Mariano Silva
Dear All, I have tried to load an EDF file using the code below and I received the following massage : Error in signals[[sn]]$signal[nextInCSignal[sn]:lastOne] <- samples[[sn]] : replacement has length zero What this massage means? Is there any problem with the EDF file? Code used: hdr <- read

Re: [R] Loading EDF files

2019-05-03 Thread Bert Gunter
Try samples[["sn"]] ? On Fri, May 3, 2019, 9:53 AM Eric Berger wrote: > Hi Mariano, > The problem appears to be that samples[[sn]] has zero length (or is NULL). > Consider the following code which gives the same error message. > > x <- 1:10 > x[1:5] <- as.numeric(NULL) > Error in x[1:5] <-

Re: [R] Loading EDF files

2019-05-03 Thread Eric Berger
Hi Mariano, The problem appears to be that samples[[sn]] has zero length (or is NULL). Consider the following code which gives the same error message. x <- 1:10 x[1:5] <- as.numeric(NULL) Error in x[1:5] <- as.numeric(NULL) : replacement has length zero HTH, Eric On Fri, May 3, 2019 at 4:32 PM M

[R] Loading EDF files

2019-05-03 Thread Marcelo Mariano Silva
Dear All, I have tried to load an EDF file using the code below and I received the following massage : Error in signals[[sn]]$signal[nextInCSignal[sn]:lastOne] <- samples[[sn]] : replacement has length zero What this massage means? Is there any problem with the EDF file? Code used: hdr <- read

Re: [R] loading the xlsx library

2019-01-14 Thread William Michels via R-help
Hello Bernard, You might consider using the "readxl" package, which (from the package description), "Works on Windows, Mac and Linux without external dependencies." https://CRAN.R-project.org/package=readxl HTH, Bill. William Michels, Ph.D. __ R-hel

Re: [R] loading the xlsx library

2019-01-11 Thread Rui Barradas
Hello, Also, sometimes it's about R/Java versions. If you have Java 32 bits you need R 32 bits. And the same for 64b. Hope this helps, Rui Barradas Às 20:37 de 11/01/2019, Jeff Newmiller escreveu: Failure to read the installation notes for the package. You have to get Java working on your

Re: [R] loading the xlsx library

2019-01-11 Thread Jeff Newmiller
Failure to read the installation notes for the package. You have to get Java working on your computer. https://cran.r-project.org/web/packages/xlsx/index.html On January 11, 2019 10:40:44 AM PST, Bernard McGarvey wrote: >When I load the library xlsx with the command > > >library("xlsx") > > >I

[R] loading the xlsx library

2019-01-11 Thread Bernard McGarvey
When I load the library xlsx with the command library("xlsx") I get the error message: > library("xlsx") Error: package or namespace load failed for ‘xlsx’: .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Regis

Re: [R] Loading Rcmdr

2017-07-25 Thread Fox, John
-boun...@r-project.org] On Behalf Of Jack Talley > Sent: Monday, July 24, 2017 7:17 PM > To: r-help@r-project.org > Subject: [R] Loading Rcmdr > > With the lastest version of R 3.4.1 I have not been able to loard Rcmdr. > Advice please. > > Thank you, > > Jack Talle

Re: [R] Loading Rcmdr

2017-07-24 Thread Jeff Newmiller
I don't know anything about Rcmdr, but perhaps you are forgetting or never knew that each x.y minor version starts a new package library, so any packages you had installed in the preceding minor version have to be reinstalled. -- Sent from my phone. Please excuse my brevity. On July 24, 2017 4

Re: [R] Loading Rcmdr

2017-07-24 Thread Mark Sharp
Jack, I do not use Rcmdr, but I installed the binary package version 2.3-2. It came right up when I then ran the following at the prompt (console output is appended without edits): > sessionInfo();library("Rcmdr");sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin15.6.0 (64

[R] Loading Rcmdr

2017-07-24 Thread Jack Talley
With the lastest version of R 3.4.1 I have not been able to loard Rcmdr. Advice please. Thank you, Jack Talley, PhD [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/

Re: [R] loading edited functions already in saved workspace automatically

2017-05-09 Thread Ralf Goertz
Am Tue, 09 May 2017 10:00:17 -0700 schrieb Jeff Newmiller : > This boils down to the fact that some "my ways" are more effective in > the long run than others.. but I really want to address the complaint > > "... sometimes tedious to rebuild my environment by reexecuting > commands in the history

Re: [R] loading edited functions already in saved workspace automatically

2017-05-09 Thread Jeff Newmiller
This boils down to the fact that some "my ways" are more effective in the long run than others.. but I really want to address the complaint "... sometimes tedious to rebuild my environment by reexecuting commands in the history" by asserting that letting R re-run a script that loads my function

Re: [R] loading edited functions already in saved workspace automatically

2017-05-09 Thread Michael Friendly
Ralf: You are afflicted with several mind bugs: * the "my-way mind bug" -- "I want to do it MY WAY, because that's sort of what I know" and also, * the "my-square-peg-should-fit-into-this-round-hole mind bug" -- "R should be able to do it MY WAY, but it puts obstacles in my path," perhaps a su

Re: [R] loading edited functions already in saved workspace automatically

2017-05-09 Thread Ralf Goertz
Am Sat, 6 May 2017 11:17:42 -0400 schrieb Michael Friendly : > On 5/5/2017 10:23 AM, Ralf Goertz wrote: > > Am Fri, 05 May 2017 07:14:36 -0700 > > schrieb Jeff Newmiller : > > > >> R normally prompts you to save .RData, but it just automatically > >> saves .Rhistory... the two are unrelated. >

Re: [R] loading edited functions already in saved workspace automatically

2017-05-06 Thread Michael Friendly
On 5/5/2017 10:23 AM, Ralf Goertz wrote: Am Fri, 05 May 2017 07:14:36 -0700 schrieb Jeff Newmiller : R normally prompts you to save .RData, but it just automatically saves .Rhistory... the two are unrelated. Not here. If I say "n" to the prompted question "Save workspace image? [y/n/c]: " my

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Bert Gunter
Haven't followed this closely, but ?Startup and links therein might be useful (esp .First). Bert On May 5, 2017 11:47 AM, "David Winsemius" wrote: > On May 5, 2017, at 7:48 AM, Michael Dewey wrote: > > Dear Ralf > > You can manually save it with > savehistory(insertyour preferred filenameher

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread David Winsemius
> On May 5, 2017, at 7:48 AM, Michael Dewey wrote: > > Dear Ralf > > You can manually save it with > savehistory(insertyour preferred filenamehere.r) > > or does that not do what you hoped? Or you can exit to your system browser and copy of the desired sections of the .Rhistory file that you

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Michael Dewey
Dear Ralf You can manually save it with savehistory(insertyour preferred filenamehere.r) or does that not do what you hoped? On 05/05/2017 14:44, Ralf Goertz wrote: Am Fri, 05 May 2017 06:30:01 -0700 schrieb Jeff Newmiller : The answer most people seem to use is to avoid depending on functio

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
Read ?history. Seems somewhat platform dependent, but they ARE different. -- Sent from my phone. Please excuse my brevity. On May 5, 2017 7:23:14 AM PDT, Ralf Goertz wrote: >Am Fri, 05 May 2017 07:14:36 -0700 >schrieb Jeff Newmiller : > >> R normally prompts you to save .RData, but it just aut

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Ralf Goertz
Am Fri, 05 May 2017 07:14:36 -0700 schrieb Jeff Newmiller : > R normally prompts you to save .RData, but it just automatically > saves .Rhistory... the two are unrelated. Not here. If I say "n" to the prompted question "Save workspace image? [y/n/c]: " my history doesn't get saved. Version: R

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
R normally prompts you to save .RData, but it just automatically saves .Rhistory... the two are unrelated. -- Sent from my phone. Please excuse my brevity. On May 5, 2017 6:44:50 AM PDT, Ralf Goertz wrote: >Am Fri, 05 May 2017 06:30:01 -0700 >schrieb Jeff Newmiller : > >> The answer most peopl

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Ralf Goertz
Am Fri, 05 May 2017 06:30:01 -0700 schrieb Jeff Newmiller : > The answer most people seem to use is to avoid depending on functions > in RData files, and in particular avoiding ever saving the > "automatic" ".RData" files at all. (Some people avoid using any RData > files, but the automatic loadin

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
The answer most people seem to use is to avoid depending on functions in RData files, and in particular avoiding ever saving the "automatic" ".RData" files at all. (Some people avoid using any RData files, but the automatic loading of functions by ".RData" files is a particularly pernicious sour

[R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Ralf Goertz
Hi, In short: Is it possible to have the previously saved workspace restored and nevertheless load a function already existing in this workspace via .Rprofile anyway? In detail: I use different directories for different projects. In all those projects I use a function which I therefore try to get

Re: [R] loading .rda file

2016-08-30 Thread Leslie Rutkowski
Thanks, all, for your quick and comprehensive help with this - very much appreciated in my R journey. Leslie On Tue, Aug 30, 2016 at 8:03 PM, Jeff Newmiller wrote: > Thanks for the perspective, Martin. I personally feel like attaching to > the search path is more confusing than being explicit,

Re: [R] loading .rda file

2016-08-30 Thread Jeff Newmiller
Thanks for the perspective, Martin. I personally feel like attaching to the search path is more confusing than being explicit, because it appears indistinguishable from namespace pollution yet for modifying data it creates copies in the current environment (in-place editing requires `<<-` which

Re: [R] loading .rda file

2016-08-30 Thread Martin Maechler
> Jeff Newmiller > on Tue, 30 Aug 2016 09:36:05 -0700 writes: > You cannot. However, you can load the file into a dedicated environment to keep those names separated from your global environment. e.g. [1] yes, that's my "famous" only-allowed use of attach() : attach() an rda-f

Re: [R] loading .rda file

2016-08-30 Thread Jeff Newmiller
You cannot. However, you can load the file into a dedicated environment to keep those names separated from your global environment. e.g. [1] The saveRDS/loadRDS functions are an alternative handle one object at a time without dragging the object names into the picture (you have to name the re-l

Re: [R] loading .rda file

2016-08-30 Thread Robert Baer
I think that the .rda extension is the old extension convention for what now gets the .RData extension name by convention. These are basically workspaces. These .RData files can contain multiple data objects, and all objects seem to read back in with the same name that they were saved with usi

[R] loading .rda file

2016-08-30 Thread Leslie Rutkowski
Hi, I'm slowly migrating from SAS to R and - for the very first time - I'm working with a native .Rda data file (rather than importing data from other sources). When I load this .Rda file into the global environment using load("file path") I see a data.frame in the global environment called "mydat

Re: [R] loading

2016-03-27 Thread Uwe Ligges
Err, you already loaded it, there is not necessarily another message. Just try the functions you want to use. .. Best, Uwe Ligges On 27.03.2016 19:10, farzana akbari wrote: hi I install plm and pglm packages but I can not load no one of them. the massage of loading plm is library(plm)

[R] loading

2016-03-27 Thread farzana akbari
hi I install plm and pglm packages but I can not load no one of them. the massage of loading plm is > library(plm) Loading required package: Formula and for pglm is > library(pglm) Loading required package: maxLik Loading required package: miscTools Please cite the 'maxLik' package as: Hen

Re: [R] Loading large .pxt and .asc datasets causes issues.

2016-02-24 Thread Torvon
label/behavioral%20risk%20factor%20surveillance%20system%20%28brfss%29 >> >> -- >> Better name for the general practitioner might be multispecialist. >> ~Martin H. Fischer (1879-1962) >> >> >> -Original Message- >> From: R-help [mailto:r-help-bo

Re: [R] Loading large .pxt and .asc datasets causes issues.

2016-02-23 Thread Anthony Damico
work at > > > http://www.asdfree.com/search/label/behavioral%20risk%20factor%20surveillance%20system%20%28brfss%29 > > -- > Better name for the general practitioner might be multispecialist. > ~Martin H. Fischer (1879-1962) > > > -Original Message- > From:

Re: [R] Loading large .pxt and .asc datasets causes issues.

2016-02-23 Thread Federman, Douglas
-help [mailto:r-help-boun...@r-project.org] On Behalf Of Torvon Sent: Tuesday, February 23, 2016 2:13 PM To: r-help@r-project.org Subject: [R] Loading large .pxt and .asc datasets causes issues. Hi, I want to load a dataset into R. This dataset is available in two formats: .XPT and .ASC. The datas

Re: [R] Loading large .pxt and .asc datasets causes issues.

2016-02-23 Thread Jan van der Laan
First, the file does contain 302 columns; the variable layout (http://www.cdc.gov/brfss/annual_data/2006/varlayout_table_06.htm) contains 302 columns. So, reading the SASS file probably works correctly. Second, the read.asc function you use is for reading geographic raster files, not fixed wid

[R] Loading large .pxt and .asc datasets causes issues.

2016-02-23 Thread Torvon
Hi, I want to load a dataset into R. This dataset is available in two formats: .XPT and .ASC. The dataset is available at http://www.cdc.gov/brfss/annual_data/annual_2006.htm. They are about 40mb zipped, and about 500mb unzipped. I can get the .xpt data to load, using: > library(hmisc) > data <

Re: [R] Loading data chartseries

2015-09-23 Thread Joshua Ulrich
On Tue, Sep 22, 2015 at 3:10 PM, bgnumis bgnum wrote: > Hi all, > > I want to plot this data on file.txt that has this format > > 01/01/2000;970,1877 > 02/01/2000;970,2224 > 03/01/2000;969,0336 > 04/01/2000;958,3023 > 05/01/2000;952,8527 > > I´m trying to plot with quantmode with this code but it

[R] Loading data chartseries

2015-09-22 Thread bgnumis bgnum
Hi all, I want to plot this data on file.txt that has this format 01/01/2000;970,1877 02/01/2000;970,2224 03/01/2000;969,0336 04/01/2000;958,3023 05/01/2000;952,8527 I´m trying to plot with quantmode with this code but it is not working X<-read.table("file.txt", col.names=c("Date","LAST"), sep

Re: [R] Loading a rda file for predicton

2014-10-13 Thread Peter Langfelder
see help(load) and pay particular attention to what the function returns: the names of the loaded objects, not the object(s) themselves. You have to use predict(fit,Testsamp,type="response") since the load() created a variable 'fit' (same name as the one saved). HTH Peter On Mon, Oct 13, 20

[R] Loading a rda file for predicton

2014-10-13 Thread TJUN KIAT TEO
I tried this fit<-glm(Pred~Pressure+MissingStep, data = Test, family="binomial") save(fit,file="pred.rda") pred<-load("pred.rda") predict(pred,Testsamp,type="response") ---

Re: [R] loading saved files with objects in same names

2014-08-23 Thread Hadley Wickham
In the future, you can avoid this problem by using saveRDS and readRDS. Hadley On Mon, Aug 18, 2014 at 7:30 PM, Jinsong Zhao wrote: > Hi there, > > I have several saved data files (e.g., A.RData, B.RData and C.RData). In > each file, there are some objects with same names but different contents.

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Duncan Murdoch
On 22/08/2014, 1:14 PM, Jinsong Zhao wrote: > On 2014/8/22 1:02, Martin Maechler wrote: >> >>> Have you tried the 'envir' argument to load()? E.g., >>> envA <- new.environment() >>> load("A.RData", envir=envA) >>> envB <- new.environment() >>> load("B.RData", envir=envB) >>> pl

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Jinsong Zhao
On 2014/8/22 1:02, Martin Maechler wrote: Have you tried the 'envir' argument to load()? E.g., envA <- new.environment() load("A.RData", envir=envA) envB <- new.environment() load("B.RData", envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.co

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Martin Maechler
> On 20/08/2014, 8:58 AM, Barry Rowlingson wrote: > > On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao wrote: > >> Hi there, > >> > >> I have several saved data files (e.g., A.RData, B.RData and C.RData). In > >> each file, there are some objects with same names but different > >> contents. Now, I ne

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Martin Maechler
> Have you tried the 'envir' argument to load()? E.g., >envA <- new.environment() >load("A.RData", envir=envA) >envB <- new.environment() >load("B.RData", envir=envB) >plot(A$object, B$object) > Bill Dunlap > TIBCO Software > wdunlap tibco.com An alternative that I have been

Re: [R] loading saved files with objects in same names

2014-08-20 Thread Duncan Murdoch
On 20/08/2014, 8:58 AM, Barry Rowlingson wrote: > On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao wrote: >> Hi there, >> >> I have several saved data files (e.g., A.RData, B.RData and C.RData). In >> each file, there are some objects with same names but different >> contents. Now, I need to compare

Re: [R] loading saved files with objects in same names

2014-08-20 Thread Barry Rowlingson
On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao wrote: > Hi there, > > I have several saved data files (e.g., A.RData, B.RData and C.RData). In > each file, there are some objects with same names but different > contents. Now, I need to compare those objects through plotting. > However, I can't find

Re: [R] loading saved files with objects in same names

2014-08-18 Thread Jinsong Zhao
On 2014/8/18 19:20, William Dunlap wrote: Have you tried the 'envir' argument to load()? E.g., envA <- new.environment() load("A.RData", envir=envA) envB <- new.environment() load("B.RData", envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com

Re: [R] loading saved files with objects in same names

2014-08-18 Thread William Dunlap
Rolf, Yes, I meant to write envA$object, etc, but did not read it twice before running off to dinner. Thanks. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 18, 2014 at 7:52 PM, Rolf Turner wrote: > On 19/08/14 14:20, William Dunlap wrote: >> >> Have you tried the 'envir' argument

Re: [R] loading saved files with objects in same names

2014-08-18 Thread Rolf Turner
On 19/08/14 14:20, William Dunlap wrote: Have you tried the 'envir' argument to load()? E.g., envA <- new.environment() load("A.RData", envir=envA) envB <- new.environment() load("B.RData", envir=envB) plot(A$object, B$object) Did you mean plot(envA$object, envB$obje

Re: [R] loading saved files with objects in same names

2014-08-18 Thread William Dunlap
Have you tried the 'envir' argument to load()? E.g., envA <- new.environment() load("A.RData", envir=envA) envB <- new.environment() load("B.RData", envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 18, 2014 at 5:30 PM, Jinsong Zhao wr

[R] loading saved files with objects in same names

2014-08-18 Thread Jinsong Zhao
Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to compare those objects through plotting. However, I can't find a way to load them into a workspace. The only thing I can d

Re: [R] Loading an .RData file and assigning the loaded objects within a loop

2013-06-01 Thread Gabor Grothendieck
On Sat, Jun 1, 2013 at 6:18 AM, Jeremy Ng wrote: > Hi all, > > I tried to look this up online, but am still feeling a little stuck. > > I have a bunch of Rdata files in side my directory, and I would like to > load all of them in a loop. Each time the next is read in, it would > over-write the pre

Re: [R] Loading an .RData file and assigning the loaded objects within a loop

2013-06-01 Thread Barry Rowlingson
Within lapply load the file and return the value of the thing or things in the file you want. Something like this: > files [1] "x1.RData" "x2.RData" "x3.RData" "x4.RData" > lapply(files,function(z){load(z);x}) [[1]] [1] 1 [[2]] [1] 22 [[3]] [1] 333 [[4]] [1] Each of my files contains a

Re: [R] Loading an .RData file and assigning the loaded objects within a loop

2013-06-01 Thread Jim Holtman
use 'lapply' to read in the .RData file. Therefore each file is stored as an element of a list thatb you can access and change as necessary. Sent from my iPad On Jun 1, 2013, at 6:18, Jeremy Ng wrote: > Hi all, > > I tried to look this up online, but am still feeling a little stuck. > > I

[R] Loading an .RData file and assigning the loaded objects within a loop

2013-06-01 Thread Jeremy Ng
Hi all, I tried to look this up online, but am still feeling a little stuck. I have a bunch of Rdata files in side my directory, and I would like to load all of them in a loop. Each time the next is read in, it would over-write the previously read in object because they will be assigned the same

Re: [R] Loading intraday data with zoo

2013-05-20 Thread arun
Hi, You may need to add "dec=","" in the read.csv. dat1<- read.table(text=" Time;Mid 31/01/2013 00:00;1,35679 31/01/2013 00:01;1,35678 31/01/2013 00:02;1,356785 31/01/2013 00:03;1,35689 31/01/2013 00:04;1,3569 31/01/2013 00:05;1,3569 31/01/2013 00:06;1,356885 31/01/2013 00:07;1,35691 31/01/2013 00:

Re: [R] Loading of package RNetCDF fails

2013-04-27 Thread Prof Brian Ripley
On 27/04/2013 14:40, Marc Girondot wrote: Dear Pavel Michna [maintainer of the package] (and copy to R-help Mailing List) When I try to load the package RNetCDF (after install from CRAN) I get this message: > library("RNetCDF", lib.loc="/Library/Frameworks/R.framework/Versions/3.0/Resources/lib

[R] Loading of package RNetCDF fails

2013-04-27 Thread Marc Girondot
Dear Pavel Michna [maintainer of the package] (and copy to R-help Mailing List) When I try to load the package RNetCDF (after install from CRAN) I get this message: > library("RNetCDF", lib.loc="/Library/Frameworks/R.framework/Versions/3.0/Resources/library") Error : .onLoad a échoué dans loa

Re: [R] loading data frames and rbind them

2013-03-13 Thread A M Lavezzi
Dear Ivan and Greg, thaks a lot! sorry for late reply, both ways work fine! I have to say that maybe Greg's is a little faster (but I am working with a relatively small amount of data, approx 130 xls files) so I do not notice remarkable differences. The only suggestion I have is to add to the rea

Re: [R] loading data frames and rbind them

2013-03-12 Thread Greg Snow
The only real improveent I can see over Ivan's solution is to use lapply instead of the loop (this may just be person preference though). Something like: list_df <- lapply( lista_rea_c, function(x) read.xls( file= paste0(path,x,"/",x,".xls"),1,header=TRUE,as.data.frame=TRUE)) my_df <- do.call(rbi

Re: [R] loading data frames and rbind them

2013-03-12 Thread Ivan Calandra
Hi Mario! I'm not really familiar with this kind of manipulations, but I think you can do it more or less like this (some people on this list might give a more detailed answer): #Create an empty named list list_df <- vector(mode="list", length=length(lista_rec_c)) names(list_df) <- lista_rea_

[R] loading data frames and rbind them

2013-03-12 Thread A M Lavezzi
Hello everybody I have the following problem. I have to load a number of xls files from different folders (each xls file has the same number of columns, and different numbers of rows). Each xls file is named with a number, i.e. 12345.xls and is contained in a folder with same name, say 12345) Onc

Re: [R] Loading a list into the environment

2013-02-04 Thread Greg Snow
An often better approach is to use a function like with or within. These allow you to run a command with your list (data frame, environment, etc.) in the first position of the search list so they behave like they are in the global environment (actually better because they temporarily mask rather t

Re: [R] Loading a list into the environment

2013-02-02 Thread Jonathan Greenberg
Thanks all! list2env was exactly what I was looking for. As an FYI (and please correct me if I'm wrong), if you want to load a list into the current environment, use: myvariables <- list(a=1:10,b=20) loadenv <- list2env(myvariables ,envir=environment()) a b --j On Fri, Feb 1, 2013 at 5:49 PM,

Re: [R] Loading a list into the environment

2013-02-01 Thread Rui Barradas
Hello, Something like this? myfun <- function(x, envir = .GlobalEnv){ nm <- names(x) for(i in seq_along(nm)) assign(nm[i], x[[i]], envir) } myvariables <- list(a=1:10,b=20) myfun(myvariables) a b Hope this helps, Rui Barradas Em 01-02-2013 22:24, Jonathan Gr

Re: [R] Loading a list into the environment

2013-02-01 Thread Gabor Grothendieck
On Fri, Feb 1, 2013 at 5:24 PM, Jonathan Greenberg wrote: > R-helpers: > > Say I have a list: > > myvariables <- list(a=1:10,b=20) > > Is there a way to load the list components into the environment as > variables based on the component names? i.e. by applying this theoretical > function to myvar

[R] Loading a list into the environment

2013-02-01 Thread Jonathan Greenberg
R-helpers: Say I have a list: myvariables <- list(a=1:10,b=20) Is there a way to load the list components into the environment as variables based on the component names? i.e. by applying this theoretical function to myvariables I would have the variables a and b loaded into the environment with

Re: [R] Loading data into R

2013-01-26 Thread arun
ot;"  "" #[4,] ""  "34" ""  "4" "" #[5,] "2" ""   "4" ""  "4" str(as.matrix(myData)) # chr [1:5, 1:5] "a" "2" "" "" "2" "b"

Re: [R] Loading data into R

2013-01-26 Thread Duncan Murdoch
On 13-01-26 3:00 PM, Christofer Bogaso wrote: Hello again, I generally use Clipboard to load data into R from Excel using the read.delim() function. In most cases, my data after loading looks like below: myData <- structure(list(V1 = structure(c(3L, 2L, 1L, 1L, 2L), .Label = c("", "2", "a"), cl

[R] Loading data into R

2013-01-26 Thread Christofer Bogaso
Hello again, I generally use Clipboard to load data into R from Excel using the read.delim() function. In most cases, my data after loading looks like below: myData <- structure(list(V1 = structure(c(3L, 2L, 1L, 1L, 2L), .Label = c("", "2", "a"), class = "factor"), V2 = structure(c(4L, 3L, 1L, 2L

Re: [R] Loading circular package from Rprofile.site

2013-01-13 Thread Prof Brian Ripley
This is a known bug in the package. It should have used utils::packageDescription, or imported it in its NAMESPACE. If this was not condiitonal on interactive() it would have be shown up in the CRAN package checks. Rprofile.site is run early in the startup process: it is not really intended

[R] Loading circular package from Rprofile.site

2013-01-13 Thread Ved P. Sharma
Hi, I installed "circular" package and I wanted to load it automatically when R starts up, so I added the following lines in file Rprofile.site, .First <- function() library(circular) When R starts up, it gives me the following error: -- Loading required package: boot Loading required p

Re: [R] loading & using Ryacas

2012-12-05 Thread David Winsemius
On Dec 5, 2012, at 10:21 AM, Alicia Ellis wrote: I'm having trouble loading Ryacas. I've downloaded and extracted Ryacas 0.2-9 (also tried Ryacas ) and yacas 1.0.63, have the latest version of R and have tried the following (this works for installing other packages): install.packages("R

[R] loading & using Ryacas

2012-12-05 Thread Alicia Ellis
I'm having trouble loading Ryacas. I've downloaded and extracted Ryacas 0.2-9 (also tried Ryacas ) and yacas 1.0.63, have the latest version of R and have tried the following (this works for installing other packages): install.packages("Ryacas") library(Ryacas) install.packages("yacas") library(y

Re: [R] loading both RPostgreSQL and RSQLite leads to problems

2012-11-08 Thread Martin Morgan
On 11/8/2012 11:43 AM, Jon McAuliffe wrote: hi martin, i have installed 2.15.2 and tried your code example below, but i still get the same error: library(RSQLite) Loading required package: DBI library(RPostgreSQL) dbDriver('PostgreSQL') Error in function (classes, fdef, mtable) : unab

Re: [R] loading both RPostgreSQL and RSQLite leads to problems

2012-11-08 Thread Jon McAuliffe
hi martin, i have installed 2.15.2 and tried your code example below, but i still get the same error: > library(RSQLite) Loading required package: DBI > library(RPostgreSQL) > dbDriver('PostgreSQL') Error in function (classes, fdef, mtable) : unable to find an inherited method for function

Re: [R] Loading Chess Data

2012-09-11 Thread Robert Baer
On 9/2/2012 11:41 AM, David Arnold wrote: All, What would be the most efficient way to load the data at the following address into a dataframe? http://ratings.fide.com/top.phtml?list=men It depends. The most efficient for me was to highlight it, copy it to the windows clipboard and execute th

Re: [R] Loading Chess Data

2012-09-02 Thread Rui Barradas
Hello, Try the following library(XML) url <- "http://ratings.fide.com/top.phtml?list=men"; chess <- readHTMLTable(url, header = TRUE, which = 5) str(chess) # See what we have # All variables are factors, # convert these to integer chess$Rating <- as.integer(chess$Rating) chess$Games <- as.i

Re: [R] Loading Chess Data

2012-09-02 Thread Hasan Diwan
Mr Arnold, > What would be the most efficient way to load the data at the following >> address into a dataframe? >> > To what end? In other words, what are you trying to achieve with the ratings list? -- H -- Sent from my mobile device Envoyait de mon portable [[alternative HTML version

Re: [R] Loading Chess Data

2012-09-02 Thread jones
You might take a look at the link titled "Download Rating List", in the blue box on the right side of that page... albyn On 2012-09-02 9:41, David Arnold wrote: All, What would be the most efficient way to load the data at the following address into a dataframe? http://ratings.fide.com/top.

[R] Loading Chess Data

2012-09-02 Thread David Arnold
All, What would be the most efficient way to load the data at the following address into a dataframe? http://ratings.fide.com/top.phtml?list=men Thanks, David -- View this message in context: http://r.789695.n4.nabble.com/Loading-Chess-Data-tp4642006.html Sent from the R help mailing list a

[R] loading 'RcmdrPlugin.FactoMineR' pachage in R

2012-08-31 Thread Mahbubeh Parsaeian
Hi everybody I have a question about loading 'RcmdrPlugin.FactoMineR' pachage in R. I have installed Rcmdr, FactoMineR and 'RcmdrPlugin.FactoMineR. when I want to load this package, at first a message inform me I should load the following list of packages: FactoMineR, ellipse, lattice, cluster, sca

[R] loading 'RcmdrPlugin.FactoMineR' pachage in R

2012-08-31 Thread Mahbubeh Parsaeian
- Forwarded Message - From: Mahbubeh Parsaeian To: "r-help@r-project.org" Cc: Sent: Friday, 31 August 2012, 17:18 Subject: loading 'RcmdrPlugin.FactoMineR' pachage in R Hi everybody I have a question about loading 'RcmdrPlugin.FactoMineR' pachage in R. I have installed Rcmdr, FactoM

Re: [R] loading both RPostgreSQL and RSQLite leads to problems

2012-08-23 Thread Martin Morgan
On 08/22/2012 01:35 PM, Jon McAuliffe wrote: hello, if i load the RSQLite package in addition to the RPostgreSQL package, i get various errors when trying to use RPostgreSQL functions. here is an example transcript showing one such error: ===

[R] loading both RPostgreSQL and RSQLite leads to problems

2012-08-22 Thread Jon McAuliffe
hello, if i load the RSQLite package in addition to the RPostgreSQL package, i get various errors when trying to use RPostgreSQL functions. here is an example transcript showing one such error: == R version 2.15.0 (2012-03-30) [...] > packa

Re: [R] Loading in Large Dataset + variables via loop

2012-07-15 Thread Rui Barradas
e, collapse = "") : dim(X) must have a positive length A.K. - Original Message - From: Rui Barradas To: cmc0605 Cc: r-help@r-project.org Sent: Sunday, July 15, 2012 8:12 AM Subject: Re: [R] Loading in Large Dataset + variables via loop Hello, Why do you need 9 variabl

Re: [R] Loading in Large Dataset + variables via loop

2012-07-15 Thread Rui Barradas
Hello, Why do you need 9 variables in your environment if they are time series that correspond to the same period? You should use time series functions. #install.packages('zoo') library(zoo) # Make up a dataset Year <- seq(from=as.Date("1901-01-01"), by="year", length.out=100) dat <- data.fra

  1   2   3   >