Displaying 20 results from an estimated 6000 matches similar to: "Re: datalist"
2011 Mar 24
1
datalist and data objects in R Package building
Hello all,
I have,say 4 R objects... bar1, bar2, bar3, bar4.. 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
2005 Apr 30
2
Warning from Rcmd check - data could not find data set
This is rw2010 from CRAN.
When running Rcmd check
on a package I get:
Warning in utils::data(list = al, envir = data_env) :
data set 'vowel.test' not found
Warning in utils::data(list = al, envir = data_env) :
data set 'vowel.train' not found
Warning in utils::data(list = al, envir = data_env) :
data set 'waveform.test' not found
Warning in utils::data(list
2005 Apr 30
2
Warning from Rcmd check - data could not find data set
This is rw2010 from CRAN.
When running Rcmd check
on a package I get:
Warning in utils::data(list = al, envir = data_env) :
data set 'vowel.test' not found
Warning in utils::data(list = al, envir = data_env) :
data set 'vowel.train' not found
Warning in utils::data(list = al, envir = data_env) :
data set 'waveform.test' not found
Warning in utils::data(list
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 "NA". It seems that when I try to name one
2005 Apr 27
1
Data() and CSV files
Hello,
For reasons I don't understand, data() imports CSV (Comma-Separated
Values) as if they were delimited by semicolons instead of commas. (Are
semicolon-separated Comma-Separated-Value files common somewhere?) Given
that this is the case, if I choose to put comma-delimited CSV files in
my data directory, what is the preferred method of loading these into
memory?
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)
Hello, i only got a small problem.
i try to create automatic new dataframes, or png?s. the main problem i
got is:
how can i create automatic a new name for a file (read out by simply
"for") -
i tried to use "(paste...) but theres an errormessage, about a wrong
declination. R told it is as.character, but need as.Real.
Should i use another method than "paste"?
i tried as
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
2004 Apr 08
1
Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply
First, here's the problem I'm working on so you understand the context. I
have a data frame of travel activity characteristics with 70,000+ records.
These activities are identified by unique chain numbers. (Activities are
part of trip chains.) There are 17,500 chains.
I use the chain numbers as factors to split various data fields into lists
of chain characteristics with each element of
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 specify
2013 Mar 23
1
sysdata.rda vs. rda files in data directory
Dear developeRs,
my package FrF2.catlg128 holds large catalogues and is supposed to gain
additional ones. All the catalogues are intended for the user.
So far, the catalogues were stored in the data directory, and LazyData
was "no". I understand that this is not considered wise any more (if it
ever was), so that I want to change to LazyData "yes" with the next
release
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,
where x
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
2006 Feb 12
1
R: mean from list
great!! thanks very much, mean(unlist(lapply(listdata, function(z) z$c)))
works well.
and what about getting the average table $a (displaying the average elements
across all 1000 matrix)? could you please help me? 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
2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
Dear All,
I was trying to call a self-defined function that performs nonlinear
regression and gets the corresponding prediction upper limit using nls2
package. However, weird thing happened. When I called the function in the
main program, an error message "fitted(nlsmodel): object 'nlsmodel' not
found" came up. But when I directly ran the codes inside the function, no
error came
2009 Jul 03
1
fix() and edit() not working with Rcmdr and german LANG-variable
Dear Mailinglist,
I just set up an R 2.9.1 environment with Rcmdr 1.4-6 on Ubuntu Jaunty
9.04. As I'm from Germany my $LANG variable is set to "de_DE.UTF-8".
Now, when I open up Rcmdr and try to edit a new datamatrix there is no
edit window appearing:
Datenmatrix <- edit(as.data.frame(NULL))
ERROR: invalid device
In addition, there are plenty of warning messages in the
2011 Nov 24
1
what is wrong with this dataset?
> d = data.frame(gender=rep(c('f','m'), 5), pos=rep(c('worker', 'manager',
'speaker', 'sales', 'investor'), 2), lot1=rnorm(10), lot2=rnorm(10))
> d
gender pos lot1 lot2
1 f worker 1.1035316 0.8710510
2 m manager -0.4824027 -0.2595865
3 f speaker 0.8933589 -0.5966119
4 m sales
2017 Dec 04
3
Dynamic reference, right-hand side of function
Hi!
Thanks for the replies!
I understand people more accustomed to R doesn't like looping much, and that thinking about loops is something I do since I worked with Stata a lot. The syntax from Peter Dalgaard was really clever, and I learned a lot from it, even though it didn't solve my problem (I guess it wasn't very well explained). My problem was basically that I have a data matrix
2017 Dec 04
0
Dynamic reference, right-hand side of function
Um, if you insist on doing it that way, at least use
assign(varname, as.vector(get(varname)))
-pd
> On 4 Dec 2017, at 22:46 , Love Bohman <love.bohman at sociology.su.se> wrote:
>
> Hi!
> Thanks for the replies!
> I understand people more accustomed to R doesn't like looping much, and that thinking about loops is something I do since I worked with Stata a lot. The
2012 Jan 08
1
fix and edit don't work: unable to open X Input Method->segfault
I can't run fix() or edit() anymore. Did I break my system?
I'm running Debian Linux with R-2.14.1. As far as I can tell, the R
packages came from Debian's testing "wheezy" repository. I would like
to know if users on other types of systems see the same problem. If
no, then, obviously, it is a Debian-only issue and I can approach it
from that point of view. And if no other