Displaying 20 results from an estimated 74 matches for "datalist".
Did you mean:
datadist
2008 Dec 16
2
Problem assigning "NA" as a level name in a list
I want to generate a list (called "dataList" below) where each of its
levels is named. These names are assigned to nameList, which contains
all possible permutations of size two taking letters from a larger
alphabet, e.g., "aa",...,"Fd",..,"Z1",... One of these permutations is
the character string &qu...
2012 Feb 21
3
Plot Many Data to same plot
Dear all,
I have a function that for a variable number of inputs plots them to the same plot
I am doing this quite simply by
plot(seq(from=start, to=stop, length.out=np), datalist[[1]]$dataset
xlim=c(start, stop), ylim=c(0, 1), type="l")
...
2007 Dec 20
1
auto named savings (pngs & data-frames)
...t((line), " "))
subject <- as.character(liste[1])
if (length(liste) < 2 ) {
data <- 0
}
else {
data <- as.numeric(liste[-1])
}
#png(paste[subject],".png")
dev.set()
boxplot(data[subject], ylim=c(400,1500))
dev.off()
datalist <- data.frame(data)
names(datalist) <- subject
print(datalist)
png("/SCR/STATISTIK/datalist.png", width=1024, height=768)
plot(datalist)
dev.off()}}
#png("/SCR/all-show.png")
#boxplot(datalist, main="Proband - ", col= "blue", ylab=
&q...
2012 May 22
1
confused with indexing
Dear all,
I have a code that looks like the following (I am sorry that this is not a reproducible example)
indexSkipped<-NULL
....code Skipped that might alter indexSkipped
if (length(indexSkipped)==0)
spatial_structure<-spatial_structures_from_measurements(DataList[[i]]$Lon,DataList[[i]]$Lat,meanVector)
else
spatial_structure<-spatial_structures_from_measurements(DataList[[i]]$Lon[-indexSkipped],DataList[[i]]$Lat[-indexSkipped],meanVector) #
What I am doing here is that I am processing files. Every files has a measurement table and Longtit...
2004 Sep 14
1
Re: datalist
...owing is a cut/paste from http://developer.r-project.org/200update.txt:
...
3) When a package is installed, all the data sets are loaded to see
what they produce. If this is undesirable (because they are
enormous, or depend on other packages that need to be installed
later, ...), add a `datalist' file to the data subdirectory as
described in `Writing R Extensions'.
...
I only saw a mentioning of 00Index in the description about the data
subdirectory in Writing R Extensions/Package Subdirectories. Could someone point
me to the right place or tell me what a 'datalist'...
2013 Feb 03
2
Compare each element of a list to a vector
Hello R-helpers,
I have a vector
x<-c(1,2,3)
and a list that contains vectors
datalist<-list(c(1,2,3),c(2,3,4),c(3,4,5),c(4,5,6))
and I would like to identify those list elements that are identical to x.
I tried
> datalist %in% x
[1] FALSE FALSE FALSE FALSE
but I am obviously using %in% incorrectly. I also tried messing around with
lapply but I can't figure out how to s...
2004 Apr 08
1
Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply
...The same thing happens with using tapply with a named vector such as:
tapply(actTime, chainId, function(x) x)
Using the following function with a for loop accomplishes the job in a few
seconds for all 70,000+ records:
> splitWithNames <- function(dataVector, nameVector, factorVector){
+ dataList <- split(dataVector, factorVector)
+ nameList <- split(nameVector, factorVector)
+ listLength <- length(dataList)
+ namedDataList <- list(NULL)
+ for(i in 1:listLength){
+ x <- dataList[[i]]
+ names(x) <- nameList[[i]]
+ namedDataList[[i]] &...
2011 Mar 24
1
datalist and data objects in R Package building
...r4.. that I'd like to include
in an R package "foobar".
The desired functionality would be:
> library(foobar)
> data(foo)
> ls()
[1] "bar1" "bar2" "bar3" "bar4"
I've tried the following two approaches:
1) I created the file 'datalist' under pre-build directory 'foobar/data/'
with the following contents:
foo: bar1 bar2 bar3 bar4
After package build and install, "data(foo)" reports that data set 'foo' not
found (bar1, bar2, etc are all available individually, and are listed under
data() as "bar...
2013 Mar 23
1
sysdata.rda vs. rda files in data directory
...h with sysdata.rda
uses only about half the size of the separate data files approach (5.6
Mb vs 11.7Mb).
As I would like to be able to query the available data in the package
via data(package="FrF2.catlg128")) even before the package is loaded, I
want to have a data directory with a datalist file in there. This
appears to be compatible with using a sysdata.rda file in the R
directory. (From a tidyness point of view, I would prefer the data file
to sit in the data directory as well; however, that about doubles the
installed size again (11.4 vs 5.6Mb) even if I use just the one
sysd...
2010 Jul 30
3
simple table/matrix problem
Hi
Given three vectors
x <- c(fish=3, dogs=5, bats=2)
y <- c(dogs=1, hogs=3)
z <- c(bats=3, dogs=5)
How do I create a multi-way table like the following?
> out
x y z
bats 2 0 3
dogs 5 1 5
fish 3 0 0
hogs 0 3 0
('out' is a matrix).
See how the first line shows 'x' has 2 bats, 'y' has zero bats, and 'z'
has 3 bats
and so on for each
2006 Feb 12
1
mean from list
hi all,
I have a simple problem that i am not able to solve. I've a list called
datalist with the following structure:
[...]
[[10]]
[[10]]$a
-1 0 1
-1 31 5 2
0 6 7 5
1 1 7 36
[[10]]$b
-1 0 1
-1 31 5 2
0 6 7 5
1 1 7 36
[[10]]$c
[1] 0.855
[[10]]$d
[1] 0.855
[...]
with [[1]] ... [[100]]. How can i get the mean value of datalist[[x]]$d,...
2017 Dec 04
0
Dynamic reference, right-hand side of function
The generic rule is that R is not a macro language, so looping of names of things gets awkward. It is usually easier to use compound objects like lists and iterate over them. E.g.
datanames <- paste0("aa_", 2000:2007)
datalist <- lapply(datanames, get)
names(datalist) <- datanames
col1 <- lapply(datalist, "[[", 1)
colnum <- lapply(col1, as.numeric)
(The 2nd line assumes that the damage has already been done so that you have aa_2000 ... aa_2007 in your workspace. You might alternatively create the...
2017 Dec 04
3
Dynamic reference, right-hand side of function
...t.org
?mne: Re: [R] Dynamic reference, right-hand side of function
The generic rule is that R is not a macro language, so looping of names of things gets awkward. It is usually easier to use compound objects like lists and iterate over them. E.g.
datanames <- paste0("aa_", 2000:2007)
datalist <- lapply(datanames, get)
names(datalist) <- datanames
col1 <- lapply(datalist, "[[", 1)
colnum <- lapply(col1, as.numeric)
(The 2nd line assumes that the damage has already been done so that you have aa_2000 ... aa_2007 in your workspace. You might alternatively create the l...
2006 Feb 12
1
R: mean from list
...I am struggling with
this...
thanks in advance
Roberto
mean(unlist(lapply(x, function(z) z$d))) should do the trick
On Sun, 12 Feb 2006 20:06:12 +0000, statistical.model at googlemail.com wrote:
> hi all,
> I have a simple problem that i am not able to solve. I've a list called
> datalist with the following structure:
>
> [...]
>
> [[10]]
> [[10]]$a
>
> -1 0 1
> -1 31 5 2
> 0 6 7 5
> 1 1 7 36
>
> [[10]]$b
>
> -1 0 1
> -1 31 5 2
> 0 6 7 5
> 1 1 7 36
>
> [[10]]$c
> [1] 0.855
&...
2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
...I attached my main program and the function as follows. Thank you all in
advance.
# Main program
rm(list=ls())
x <- c(0,1,3,4,5,2,10,4,6,8,7)
y <- seq(0,10,1)
ftestnls(x,y) # Call the function
# function 'ftestnls(v1,v2)'
# v1 <- x
# v2 <- y
ftestnls <- function(v1,v2){
datalist <- list(v1=v1,v2=v2)
startvalues <- list(a0=v1[1],a1=0,a2=0)
# Perform nonlinear regression
require(nls2)
nlsmodel <- nls(v1~a0 + a1*v2 + a2
*sin(2*pi*v2/365.25),data=datalist,start=startvalues, trace=TRUE)
# Fitted data and prediction interval
fitted <-
predict(as.lm(...
2010 Aug 10
0
Error in R2Bugs
Hello,
I am running a GLMM using R2Bugs, but am getting the below error message. I am including the entire output, although the 2nd and 3rd lines seem to indicate the problem. Note that I do define N (it is an integer) and send it to a datalist (see the R commands and model below). Interestingly, when I put all of this into OpenBugs directly, the model runs. I do have reasons, however, that I would like to do this through R.
model is syntactically correct
expected variable name error pos 341553 (error on line 1)
variable N is not defin...
2009 Jul 03
1
fix() and edit() not working with Rcmdr and german LANG-variable
...rotocol error: BadWindow (invalid Window parameter)
Warning: X11 protocol error: BadWindow (invalid Window parameter)
[...]
When I click on the "view data set" button a window appears but instead
of a datamatrix it shows the following content :
structure.1L...Label....Error.in.dataentry.datalist..modes....invalid.device.n...class....factor..
Error in dataentry(datalist, modes) : invalid device\n
Another click on "edit data set" results into RCommander segfaulting:
Selection:
Segmentation fault (core dumped)
The best part is that when I run R with the following command
> LAN...
2011 Nov 24
1
what is wrong with this dataset?
...er 0.8933589 -0.5966119
5 f worker 1.1035316 0.8710510
6 m investor -0.5770073 -1.5200347
7 m manager -0.4824027 -0.2595865
8 m sales 0.4489920 0.4971199
9 m speaker -1.3045821 0.4373199
10 m worker 0.2777642 -0.3338369
> dataset = read.csv('datalist.csv')
> dataset
Gender Title Category Salary
1 M Manager 3 27000
2 F Manager 2 22500
3 M Sales Rep 1 18000
4 M Sales Rep 3 27000
5 F Manager 3 27000
6 M Secretary 4 31500
7 M Sales Rep...
2017 Dec 04
0
Dynamic reference, right-hand side of function
...ic reference, right-hand side of function
>
> The generic rule is that R is not a macro language, so looping of names of things gets awkward. It is usually easier to use compound objects like lists and iterate over them. E.g.
>
> datanames <- paste0("aa_", 2000:2007)
> datalist <- lapply(datanames, get)
> names(datalist) <- datanames
> col1 <- lapply(datalist, "[[", 1)
> colnum <- lapply(col1, as.numeric)
>
> (The 2nd line assumes that the damage has already been done so that you have aa_2000 ... aa_2007 in your workspace. You might a...
2009 Jun 30
1
How to wrap my (working) code in a loop or function? (loop/function newbie alert)
Dear R-helpers,
I have split a dataframe into a list with five elements, with the following
code:
> datalist<-split(data,data$UNIT)
I would now like to run some code (below) on each element of the list to
extract rows from the list elements; then I would like to rbind the
extracted rows into a new dataframe containing all of the extracted rows
from all of the list elements.
I don't need any help...