similar to: data.frame to list

Displaying 20 results from an estimated 20000 matches similar to: "data.frame to list"

2006 Jun 09
3
function parameters - testing
Hello, I am trying to test a function argument to see if it is or is not a useful number. However I cannot seem to find a test that works. For example > f = function(x) { + print(exists("x")) + print(is.null(x)) + } >rm(x) > f(z) [1] TRUE Error in print(is.null(x)) : Object "z" not found exists gives TRUE, but then any other kind of test I try to run gives me an
2006 Apr 17
4
R debugging options
Hello, What options are available for me to debug my R scripts? For example I normally do something like >source("myfunctions.R") >function1("height", "weight") myfunctions.R is a large R source file that contains many functions. function1 is the "main" function in myfunctions.R. It calls many other user-written functions that are also in
2007 May 05
6
intermittent pxe failure
Hi, I have an intermittent pxelinux boot problem. It happens rarely, for example it happened one day and then did not happen again until 6 days later. However when it does happen it is rather serious as it affects all clients on the network. Here is some basic info: - IBM netvista PCs, built-in pxe, banner says it is "PXE 2.x". - happens rarely, but when it does it affects all clients.
2006 Apr 08
2
copying and pasting to R in linux
When I use R, I am accustomed to developing programs in a text processor, and then copying from the text processor and pasting into R. This usually works fine, except that using the default text processor in Suse 9.0, long programs don't transfer completely. Using the 'source' program, also only works with small programs. Suggestions?
2002 Aug 13
2
Misalignment of <NA> in rownames (PR#1905)
An NA in the rownames of a matrix (or dataframe) causes misalignment when the matrix is printed: R> x <- matrix(1:12, 3,4, dimnames=list(letters[1:3], LETTERS[1:4])) R> rownames(x)[2] <- NA R> x A B C D a 1 4 7 10 <NA> 2 5 8 11 c 3 6 9 12 The bug is in function Rstrlen, in src/main/printutils.c. MatrixRowLabel and MatrixColumnLabel (same file) rely on Rstrlen
2008 Nov 07
1
Problems with packages fda and splines (PR#13263)
Full_Name: David D Degras Version: 2.8.0 OS: Mac OS X Submission from: (NULL) (128.135.239.11) I have recently installed the version 2.8.0 of R along with package fda (v 2.0.2) and its dependencies (including package splines v. 2.8.0). Here are my problems: 1) The package splines should feature functions such a predict.bs, predict.bSpline and such and it does not! I can make calls to bs, ns,
2023 Oct 17
1
transform a list of arrays to tibble
Arnaud, Short answer may be that the tibble data structure will not be supporting row names and you may want to simply save those names in an additional column or externally. My first thought was to simply save the names you need and then put them back on the tibble. In your code, something like this: save.names <- names(my.ret.lst) result.tib <- as_tibble_col(unlist(my.ret.lst),
2023 Oct 17
1
transform a list of arrays to tibble
I work with a list of crypto assets daily closing prices in a xts class. Here is a limited example: asset.xts.lst <- list(BTCUSDT = structure(c(26759.63, 26862, 26852.48, 27154.15, 27973.45), dim = c(5L, 1L), index = structure(c(1697068800, 1697155200, 1697241600, 1697328000, 1697414400), tzone = "UTC", tclass = "Date"), class = c("xts", "zoo")), ETHUSDT
2023 Nov 05
2
Cryptic error for mscmt function
Hi everyone, I am trying to conduct a synthetic control analysis using the MSCMT package. However, when trying to run it I get a very cryptic error message saying "Error in lst[[nam]][intersect(tim, rownames(lst[[nam]])), cols, drop = FALSE]: subscript out of bounds". Does anyone know what this means and why I receive this error? I attached the code & dataset used in the
2007 May 09
1
PXE boot screen
On Tuesday 08 May 2007 21:44, Tim Bates wrote: > I have been using PXELINUX for a few years now to boot our school's PCs. > For a while I've had the school logo and blank background fill the > screen to make it look more professional, but that means I can't see the > hardware address or IP address a machine gets. Hi Tim, How do you make a logo show during boot? Thanks,
2007 Apr 05
2
creating a data frame from a list
Dear all, A few months ago, I asked for your help on the following problem: I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), +
2006 Jul 05
1
creating a data frame from a list
Dear all, I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), + b=c(A=2,B=3,C=0,D=NA), + c=c(A=NA,B=2,C=NA,D=0) ) > dtf a b
2005 Mar 29
6
Aggregating data (with more than one function)
I have the data similar to the following in a data frame: LastName Department Salary 1 Johnson IT 56000 2 James HR 54223 3 Howe Finance 80000 4 Jones Finance 82000 5 Norwood IT 67000 6 Benson Sales 76000 7 Smith Sales 65778 8 Baker HR 56778 9 Dempsey HR 78999 10 Nolan
2003 May 08
3
Avoiding loops to spare time and memory
Is it possible to avoid the loop in the following function (or make the function otherwise more efficient) and can someone point me to a possible solution? (It would be great if hours could be reduced to seconds :-). # --------------------------------------------- RanEigen=function(items=x,cases=y,sample=z) { X=matrix(rnorm(cases*items),nrow=cases,byrow=F) S=crossprod(X-rep(1,cases) %*%
2006 Apr 09
2
configure error
*I've been trying for several weeks to install R-2.2.1 on a PC with an AMD Athlon 64 2800*+* processor running Mandriva 2006_64. After unpacking R-2.2.1.tar.gz I ran ./configure. However, configure stopped prematurely with the message *"configure:27295: WARNING: gfortran and gcc disagree on int and double configure:27297: error: Maybe change CFLAGS or FFLAGS?"* Altough
2006 Jun 09
1
Saving dns2.plot as a jpg image
Hello, I am using R 2.2.1 with sn 0.4.0 and am trying to save a dns2.plot as a jpg file. Here is the latest version of the code I have tried: x <- seq(0,200,length=200) y <- seq(0, 35, length=200) jpeg(filename = "C:/fig1.jpg", width = 5, height = 4,pointsize = 12, quality = 100, bg = "white", res = NA)
2006 Apr 07
2
Command line support tools - suggestions?
Dear Community, I'm interested in developing a package that could ease the command-line learning curve for new users. It would provide more detailed syntax checking and commentary as feedback. It would try to anticipate common new-user errors, and provide feedback to help correct them. As a trivial example, instead of > mean(c(1,2,NA)) [1] NA we might have > mean(c(1,2,NA)) [1]
2006 May 04
2
install R under suse: packages dependency
Hi all I'm trying to install R 2.3.0 under Suse 10.0. As I'm using SSH to login into the SUSE server, I can't use YAST2, so I have to use rpm -i in the shell. The system tells me that I need some other packages such as xorg-x11-fonts-100dpi, blas, libgfortran.so.0(). Is there some website where I can download and install these packages? Thanks a lot! Zhihua Li
2011 May 19
1
Feature request: extend functionality of 'unlist()' by args 'delim=c("/", "_", etc.)' and 'keep.special=TRUE/FALSE'
Dear list, I hope this is the right place to post a feature request. If there's exists a more formal channel (e.g. as for bug reports), I'd appreciate a pointer. I work a lot with named nested lists with arbitrary degrees of "nestedness". In order to retrieve the names and/or values of "bottom layer/bottom tier", I love the functionality of 'unlist()', or
2008 Oct 27
1
Problem with script
Hello :-) I am trying to run the next script, it generates "random areas" inside a map of the american continent, and then plot it, it?s suppose that every frame gives you the evolution of the program but at some point it stops with the weirdest of the errors I?ve ever seen in R, I don?t even have a line like that :-| Error in if (random_matrix[x_list[random_sq] - 1,