similar to: Indexing lists

Displaying 20 results from an estimated 11000 matches similar to: "Indexing lists"

2006 Jul 19
3
illegal operation in debian (PR#9086)
Full_Name: Agustin Perez Version: 2.3.1 OS: Debian 2.6.8-11-amd64-generic Submission from: (NULL) (193.147.142.6) First of all excuses for my bad use of english and thanks for read my problem. Well when I do the following comand in R suddenly crashes and exit me for the enviroment: > a<-matrix(1:13500,450,30) > a%*%t(a) *** caught illegal operation *** address 0x2a9590086f, cause
2003 Dec 15
2
Error with spdep
Dear useRs: First of all I would like to thank all the responses. I've an error with package "spdep". I am working with a Windows XP machine (AMD-2000-XP RAM-256DDR) and 1.8.0. R-version and when I try to load spdep appear the following error: > library(spdep) Error in loadNamespace(i, c(lib.loc, .libPaths()), keep.source) : There is no package called
2003 Dec 18
3
Summaries
Hello UseRs: Excuses for my english. I have a dataset with 65000 records and I'd like to make a summary where I can view all the values (with the number of times that it repeats) that there are each column of my dataset. I tried with summary( ), str( ), but nothing gives me the result that I am loking for. Thank you very much.
2004 Jun 23
2
legend
DeaR UseRs: I want to put a legend in my plot. In the first line of the legend I want to put a box filled but in the second one I would like to put a lty=2 Of course it must appear with different colors. Thanks.
2004 Feb 20
1
read.table with spaces
DeaR useRs: Excuses for my english. I am trying to read a file with my dats and the format is a number, 3 spaces, other number, etc... When I use: a<-read.table(file="c:/datos2.dat",sep="") R sais: Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 3 did not have 34 elements And I see my dats and in line 3 the first number is an
2012 Jun 26
2
flatten lists
I am looking for a function to flatten a list to a list of only 1 level deep. Very similar to unlist, however I don't want to turn it into a vector because then everything will be casted to character vectors: x <- list(name="Jeroen", age=27, married=FALSE, home=list(country="Netherlands", city="Utrecht")) unlist(x) This function sort of does it: flatlist
2003 Nov 14
1
packages
Hello every body, I am new in this list and I am Spanish (excuses for my English) I have a lot of versions of R (under windows) and I want to know the mode to use the packages of these versions without download any more. It takes me more time because I have all the packages that there are in CRAN. Thanks, Agustin Perez
2004 Jan 07
5
assign
DeaR useRs: I would like to assign a values in an object using a loop 'for'. This is a reduce example of my problem, my real problem is a few complicated: for (j in 1:10) { x.j<-rnorm(100) } I want to create 10 objects as "x.1, x.2, ... , x.9, x.10" with values in it. I used the "assign" function but nothing happens. Thank you very much
2004 Feb 23
3
library nnet
DeaR useRs: I am looking for a function which fits a multinomial model and in Baron?s page I find the function "multinom" in package "nnet" but this package is deprecated. I suppose that this function is now in other package but I can't find it. Can you help me? Thanks.
2010 Sep 04
4
Please explain "do.call" in this context, or critique to "stack this list faster"
I've been doing some consulting with students who seem to come to R from SAS. They are usually pre-occupied with do loops and it is tough to persuade them to trust R lists rather than keeping 100s of named matrices floating around. Often it happens that there is a list with lots of matrices or data frames in it and we need to "stack those together". I thought it would be a simple
2009 Mar 28
2
Output an RWeka model via sink
When I sink the output of an RWeka model to a text file, the output file appears empty: library(RWeka) model = LogitBoost(Species~.,data=iris) print(model) sink("output.txt") print(model) #file output.txt is created, but it is blank sink() Am I doing anything wrong? [[alternative HTML version deleted]]
2002 Apr 24
2
Regarding pp.plot(){CircStats}
[message needed manual approvement: it had a single line "help" -- MM ] I have a table containing two columns and some 600 rows. The first column is a time series in the sense contains the amount of time the model that i am studying stays in a particular state(ie sojourn time). I extract the contents of the table using read.table. and extract the first column from the table
2008 Oct 29
2
Functional pattern-matching in R
I found there's a very good functional set of operations in R, such as apply family, Hadley Wickham's lovely plyr, etc. There's even a Reduce (a.k.a. fold). Now I wonder how can we do pattern-matching? E.g., now I split dimensions like this: m <- dim(V)[1] # R n <- dim(V)[2] # still R While even Matlab allows for [m,n] = size(V) % MATLAB! Ideally I'd be able to
2010 Mar 08
1
lapply and list indexing basics
I have split my original dataframe to generate a list of dataframes each of which has 3 columns of factors and a 4th column of numeric data. I would like to use lapply to apply the fitdistr() function to only the 4th column (x$isi) of the dataframes in the list. Is there a way to do this or am I misusing lapply? As a second solution I tried splitting only the numeric data column to yield a list
2005 Feb 03
5
How to convert a list to a matrix
Hi Sorry to ask such a basic question. I have a list, each element of which is a vector of two values. What I actually want is a matrix with two columns, and one row per element of the list. Obviously I have tried as.matrix(), and as.vector() but I didn't expect the latter to work. I feel so lame asking this. Any suggestions? Mick
2004 May 10
2
Lists and outer() like functionality?
Hi, I'm have a list of integer vectors and I want to perform an outer() like operation on the list. As an example, take the following list: mylist <- list(1:5,3:9,8:12) A simple example of the kind of thing I want to do is to find the sum of the shared numbers between each vector to give a result like: result <- array(c(15,12,0,12,42,17,0,17,50), dim=c(3,3)) Two for() loops is the
2009 Oct 25
3
NULL elements in lists ... a nightmare
I can define a list containing NULL elements: > myList <- list("aaa",NULL,TRUE) > names(myList) <- c("first","second","third") > myList $first [1] "aaa" $second NULL $third [1] TRUE > length(myList) [1] 3 However, if I assign NULL to any of the list element then such element is deleted from the list: > myList$second <-
2002 Feb 25
4
replace NAs
Dear R community: it is possible to replace NA?s in a data frame with zeroes? what should I do? Thanks in advance Juan Pablo _________________________________________________________________ MSN Photos es la manera m?s sencilla de compartir e imprimir sus fotos: http://photos.latam.msn.com/Support/WorldWide.aspx -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2004 May 20
1
write in fixed format
DeaR useRs: I have a problem, because I have a file in fixed width format and I can read it with 'read.fwf' and after I can use these data to do generate new columns (variables) and when I am going to write this set of data (data.frame) I can't find a function which storages my data.frame in fixed width format. Can you help me? Thanks in advance. Agust??n P??rez Universidad Miguel
2004 Sep 20
1
Memory Problem???
DeaR useRs: I am working with 10000 files at the same time. These files are in some lists. When I begin to operate the memory size grows, but never exceeds the computer’s RAM. And suddenly R reports: Error: cannot allocate vector of size 23 Kb Somebody know what can I do? Thanks and excuse my English. --- [[alternative HTML version deleted]]