search for: getdata

Displaying 20 results from an estimated 97 matches for "getdata".

Did you mean: get_data
2011 Mar 18
1
help please: put output into dataframe
...<- rnorm(500, 20, 8) var3 <- rnorm(500, 30, 18) var4 <- rnorm(500, 40, 20) datafr1 <- data.frame(var1, var2, var3, var4) # my unsuccessful codes nvar <- ncol(datafr1) for (i in 1:nvar) { out1 <- NULL out2 <- NULL medianx <- median(getdata[,i], na.rm = TRUE) show(madx <- mad(getdata[,i], na.rm = TRUE)) MD1 <- c(medianx + 2*madx) MD2 <- c(medianx - 2*madx) out1[i] <- which(getdata[,i] > MD1) # store data that are greater than median + 2 mad out2[i] &l...
2004 Mar 24
2
debugging a code
...HowTo but R, reminded me with the way Perl does it but with much less on-line commands, R "AFAIK" has n, c, Q and where and cann't debug outside the {}. 1) is there a more versatile/flexable debugging method for R? I have saved 2 functions in an ASCII file "digfun". "getdata" function calls "squash" function and both use loops. In another file.R I have source("digfun") debug(getdata) data <- getdata("c:/data/") Browse[1]> c Error in if (d[i, "V3"] == d[i + 1, "V3"] && d[i, "V4"] == d[i + 1...
2006 Jun 26
1
Passing arguments from a function within another function
Hi all, I have a function getSomeData() that is called from command line - getSomeData(id='1240'). The function getSomeData() calls another function getData that needs the exact same argument passed to getSomeData(). I am using the function call getData(paste(names(args[1]), "=", sQuote(args[[1]]))). The argument passed is- id='1240'. The problem is that in getData(), it treats the whole thing "id='1240'" as on...
2006 Jun 29
1
Problems Creating an R package
Hi all, When I check my package using "Rcmd check ..\myPackage\R.mykg" on Windows in Command Prompt, this is what get:- * using log directory 'C:/R/bin/R.getdata.Rcheck' * using Version 2.3.1 (2006-06-01) * checking for file 'R.getdata/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'R.getdata' version '1.0' * checking package dependencies ... OK * checking if this is a source package ... OK * checking...
2002 Dec 17
0
getData.lme error
...i list, i am making some diagnostic plots using plot.lme(), my lme model was fit with the option na.action='na.exclude'. On the following (or similar) commands: plot(flu.trees.42.w25.10.2, resid(., type="p") ~ fitted(.)|species, abline=0) R returns an error message: Error in getData.lme(object) : couldn't find function "naAct" It turns out that the function getData.lme does: naAct <- eval(mCall$na.action) if (!is.null(naAct)) { data <- naAct(data) } however, the funcion na.exclude is not properly assigned to naAct in this way. Has anyone...
2003 Jan 30
2
Weird options(digits=n) behaviour
I noticed some very weird behaviour of the function: options(digits=n), where n is the number of digits you would expect to get in R calculations. Let's take a example: > options(digits=4) > getdata(caso.pool.k3.r3.e2) [1] 6.053 2.641 -3.639 14.259 6.082 Which works fine... now, trying again, with different data: > options(digits=4) > getdata(controle.pool.k3.r3.e2) [1] -0.03091 1.60310 -4.90588 5.07379 -0.04418 > Which gives me 6 digits instead of 6. If I try digits=2...
2004 Feb 28
1
when .Call can safely modify its arguments
...uot; clearly states that a C-function interfaced via .Call() should not modify any of its arguments. However I wonder if there are exceptions to this rule, i.e. when .Call can safely modify the arguments. For example when a function creates a list that is then populated by a call to a C function: getData <- function() { data <- list(a=double(2), b=character(3)) # now populate_list modifies data .Call("populate_list", data) data } What can go wrong in this example? And while we are here I wonder what happens to 'data' when getData() returns it. Is i...
2009 Oct 01
5
How to use Subpopulation data?
...to calculate the statistics but i only get the population parameters.   H <- matrix(rnorm(100, mean=50000, sd=5000)) sampleframe=data.frame(type=c(rep("H",100)),value=c(H)) sampleframe   str=strata(sampleframe,c("type"),size=c(20,), method="srswor") sample.strat<-getdata(sampleframe,str) sample.strat length(H) i get:   length(H) [1] 100 Desire to get: length(H) [1] 20   Best Regards     [[alternative HTML version deleted]]
2012 Nov 06
1
how Can make function for selecting the products
HI. I make this code: getdata<-function('a','b','c' ,'d','e','f'){ drv <- dbDriver("SQLite") con<-dbConnect(drv, "sqlite.db") lt<-dbListTables(con) myf<-data.frame(NULL) for (i in 1:length(lt)) { myfile<-dbReadTable(con,lt[i]) myfile1<...
2012 Mar 28
2
Making Knitr work
...tr. I could get it to work on easy files, but my earlier written sweave file fails to be knit properly. Here is the error message: Quitting from lines 273-276: Error in setwd(base.dir) : kann Arbeitsverzeichnis nicht wechseln (it says: cannot change workspace) The chunk that is 273-276: <<getdata,echo=F>>= library(e1071) source("/src/TestRandomStuff.R") allData<-createNormallyDistributedClasses(2, c(-2,2), 50, 2) @ Further mentions of the chunk in console (its strangely listed twice): |>>>>>>>>>>>>>>>>>>>>>&...
2012 Jan 27
1
Overimposing one map in ssplot onto another
...both identical in terms of outline. Is there any way to superimpose Map1 (which has black borders between Canadian provinces) onto Map2 (which is also a map of Canada)? Thanks a lot for your hints! Dimitri ### A. Reading in Canada data at the province and then at the county level: library(raster) getData('ISO3') # Canada's code is "CAN" can1<-getData('GADM', country="CAN", level=1) can2<-getData('GADM', country="CAN", level=2) ### B. Creating Map1- with borders between provinces: can1 at data[["groups"]]<-1 # want all...
2007 Jun 14
2
connecting to DB2 database
Hi, i am trying to connect to a DB2 server using the DBI library. getData <- function() { driver <- dbDriver("DB2") conn <- dbConnect(driver,"server","uname","pword") data <- dbSendquery(conn, "select etc.") } When I run the function, i get the error > data <- getData() Error in...
2012 Jan 25
4
x11() graphic device, displaying raster
...splayed. I found some pages where it is mentioned that x11() not always supports raster rendering. Is there any add on for x11, any update or any R-package which solves that displaying problem in Windows? What I try to test it is an example from the package {raster}: library(raster) DEU_alt <- getData("alt", country="DEU", mask=TRUE) x11() plot(DEU_alt,axes=TRUE) best regards, /johannes -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
2012 Jan 25
4
x11() graphic device, displaying raster
...splayed. I found some pages where it is mentioned that x11() not always supports raster rendering. Is there any add on for x11, any update or any R-package which solves that displaying problem in Windows? What I try to test it is an example from the package {raster}: library(raster) DEU_alt <- getData("alt", country="DEU", mask=TRUE) x11() plot(DEU_alt,axes=TRUE) best regards, /johannes -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
2005 Jan 11
0
AGI Application Hangup when using AGI->getdata
Before coming in here , I had a deep dig into Google and couldn't find an answer, Simply spoken, using agi->getdat in an AGI application , the call disconnects if digits are entered fast by user. I'm certain that others have been though this problem, please pour your experience here :-) . Ali Mughrabi
2017 Sep 21
1
Improve ScopedPrinter::printNumber? (was: [llvm] r313816 - [llvm-readobj] Fix 'Teach readobj to dump .res files'.)
...onst ResourceEn > SW.printNumber("Version (major)", Ref.getMajorVersion()); > SW.printNumber("Version (minor)", Ref.getMinorVersion()); > SW.printNumber("Characteristics", Ref.getCharacteristics()); > - SW.printNumber("Data size", Ref.getData().size()); > + SW.printNumber("Data size", (uint64_t)Ref.getData().size()); > SW.printBinary("Data:", Ref.getData()); > SW.startLine() << "\n"; > }
2006 Nov 17
1
Manipulating R lists in C
...EXP priceList; // create main list of vectors (unspecific items ) PROTECT( priceList = allocVector( VECSXP, 3 ) ); // for each item create a label and attach value PROTECT( typeValStr = allocVector( STRSXP, 1 ) ); SET_STRING_ELT( typeValStr, 0, mkChar( getPriceDataTypeAsString( p.getData().getType() ).c_str() ) ); SET_STRING_ELT( priceList, 0, typeValStr) ; SEXP priceSXP; PROTECT( priceSXP = allocVector( REALSXP, 1) ); REAL(priceSXP)[0] = p.getData().getPrice(); SET_VECTOR_ELT( priceList, 1, priceSXP); SEXP volumeSXP; PROTECT( volumeSXP = allocVector( REALSXP...
2008 Nov 30
2
Snow and multi-processing
...00,000 line by x column matrix had to be shipped along with the item in the list and the traffic time was actually longer than the computing time. However, if I export the 500,000 object first across the spawned processes as in this mock script cl <- makeCluster(nnodes,method) mArrayData <- getData(experiments) clusterExport(cl, 'mArrayData') Results <- parLapply(cl, theMapList, function(x) t.testFnc(x)) With a function that define the mArrayData argument as a default parameter as in t.testFnc <- function(probeList, array=mArrayData){ x <- array[probeList$A,] y &lt...
2004 Mar 27
1
building a list in loop
Hello getdata <- function(p){ fname <- NULL; dl <- list()#build the sturcture builddl <- function(q,s){ fname <<- c(fname,s) #where "s" is a string dl <<- list( dl, dt2) } list(names = fname, data = dl) } data <- getdata("c:\somepath") > data $names [1...
2010 May 04
1
[PATCH] Config: Don't require all referenced software to be available
...irtV2V/Config.pm +++ b/lib/Sys/VirtV2V/Config.pm @@ -107,6 +107,7 @@ sub get_transfer_iso # config file # We use a hash here to avoid duplicates my %path_args; + my %paths; foreach my $path ($dom->findnodes('/virt-v2v/app/path/text()')) { $path = $path->getData(); @@ -118,12 +119,10 @@ sub get_transfer_iso $abs = $path; } - # Check the referenced path is accessible - die(user_message(__x("Unable to access {path} referenced in ". - "the config file", -...