similar to: confused with indexing

Displaying 20 results from an estimated 130 matches similar to: "confused with indexing"

2011 Oct 19
1
Estimating bivariate normal density with constrains
Dear R-Users I would like to estimate a constrained bivariate normal density, the constraint being that the means are of equal magnitude but of opposite signs. So I need to estimate four parameters: mu (meanvector (mu,-mu)) sigma_1 and sigma_2 (two sd deviations) rho (correlation coefficient) I have looked at several packages, including Gaussian mixture models in Mclust, but I am not sure
2010 Aug 18
1
ask for help about netcdf
hi,r project I am a new user who has some questions about r tool,I have some original data file in netcdf format which is a famous geometry data file format, The file contains very large weather information from every zone of the world,I want to extract only a part of them to calcuate, like the information in a city or the information between exact latitute range and longtitude range, can r tool
2008 May 05
2
Geocoding and XMLRPC
Hello people, I''m implementing a geocoding feature in my web app, a classic feature, for showing registered user by location. For this purpose, I''ve inspired myself from the following tutorial : http://earthcode.com/blog/2006/04/rails_geocoding_and_google_map.html However, I''m getting this error from Rails : uninitialized constant SandboxController::XMLRPC Being a
2011 Jul 01
0
How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
Dear R users, subject: How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track or subject as: How to filter XY pairs of inacurate gps position: (latitude, longtitude) to get estimated correct position before calculating track i.e. How to estimate (time series? )? How to filter XY pairs of
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
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
2004 Sep 14
1
Re: datalist
Hi, The following 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
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
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
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
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
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, 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
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
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
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
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