similar to: Fill in empty spaces modified

Displaying 20 results from an estimated 2000 matches similar to: "Fill in empty spaces modified"

2017 Aug 09
1
Fill in empty spaces modified
Thank you so much Jim. I forgot to state that i was hoping to get it without loops if possible. Thanks again, EK [[alternative HTML version deleted]]
2013 Jul 24
1
Understanding modification in place
Hi all, Take this simple script, which I'm trying to use to understand when modification in-place occurs, and when a new object is created: message("Global") x <- 1:3 .Internal(inspect(x)) x[2] <- 1L .Internal(inspect(x)) message("In function") (function() { x <- 1:3 .Internal(inspect(x)) x[2] <- 1L .Internal(inspect(x)) })() If I run it from the
2013 Jan 24
1
Copy on assignment and .Internal(inspect())
Hi, I would like to know if it's ok to use .Internal(inspect(x)) in order to detect vector copying. Take for example the following silly code: f <- function() { x = seq(10) print(.Internal(inspect(x))) for(i in seq(10)) { x[i] <- x[i] + 1 print(.Internal(inspect(x))) } } The output of f() was: @bd7acf0 13 INTSXP g0c4 [NAM(1)] (len=10, tl=0) 1,2,3,4,5,... [1] 1 2
2013 Feb 26
3
Merging value labels into indicator variable.
I have a vaiable named NAM having value : 1,2,3,4,5,6,7,8,9. I want to make an indicator variable that will take value 1 if NAM=7 or NAM=8 or NAM=9. How can I do that? I usually do: Var001<- ifelse(NAM==7,1,0) for the simplest case. [[alternative HTML version deleted]]
2003 Mar 06
1
Problems with variable types.
Hi all, I have problems in a dataframe variables types. Look: from a loop function: for(...){ ... dados.fin <- rbind(dados.fin, c(L=j, A=j^2, Nsp=nsps, N=length(amosfin$SP), AmT="am",NAm=nam, AMST=amst)) dados.fin <- rbind(dados.fin, c(L=j, A=j^2,
2019 Jul 17
2
ALTREP wrappers and factors
Hello, I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function. I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the
2011 Nov 24
1
Confused about NAMED
Hi, I expected NAMED to be 1 in all these three cases. It is for one of them, but not the other two? > R --vanilla R version 2.14.0 (2011-10-31) Platform: i386-pc-mingw32/i386 (32-bit) > x = 1L > .Internal(inspect(x)) # why NAM(2)? expected NAM(1) @2514aa0 13 INTSXP g0c1 [NAM(2)] (len=1, tl=0) 1 > y = 1:10 > .Internal(inspect(y)) # NAM(1) as expected but why different to x?
2010 Nov 19
1
how to save object created by assign()
Hi there, When I run the following code, I could get correct objects (with correct values): for(i in 1:6) { #-- Create objects 'r.1', 'r.2', ... 'r.6' -- nam <- paste("r",i, sep=".") assign(nam, 1:i) # save(nam, file = paste(nam, "RData", sep = ".")) } I hope to save the object 'r.1',
2009 Jan 30
3
paste together object names to pass it on to a function
Hello, I have a maybe trivial question, but I simply don't understand well enought how to work with text/strings: I have a rather compelx data structure, a big list with several sub-lists/dataframes and for certain calculations (which I do in loops), I only need a certain group of sub-lists/dataframes, which I want to specify with a name vector and paste together the object name and pass it
2004 Feb 20
2
passing object names in a vector to save?
Hi! Like to write quite a lot (ca 100) of objects from my envirovment with save. The names of the objects are in a list nam. nam<-dir() nam<-grep("E",nam,value=T) length(nam) 20 for(x in nam) { #reads the objects and assigns the names. assign(x,simFromEmboss(Simmatrix(),x)) nnam<-paste(x,".rda",sep="") print(nnam) save(x,file=nnam) } I knew that
2013 Mar 02
1
Expressions in lattice conditional variables
I would like to have a lattice conditioning ( | var ) variable have expression() as values because I want panel labels to be able to use plotmath notation for subscripts, etc. lattice barks at this. Does anyone know of a trick workaround? An attempted example program is below. Thanks -Frank require(lattice) set.seed(1) var <- c(rep('A', 100), rep('B', 100)) trt <-
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
Hello, I was wondering if there were any plans for ALTREP lists (VECSXP)? It seems to me that they could be supported in a similar way to how ALTSTRING works, with Elt() and Set_elt() methods, or would there be some problems with that I?m not seeing due to lists not being atomic vectors? I was taking an approach of converting each list element (of a file-based list data structure) to an ALTREP
2007 Dec 30
2
refering to variable names in lm where the variable name is in another variable
I am trying to refer to a variable name in a lm regression where the variable name is in another variable, but it does seem to work. Here is an example: y<-rnorm(10) dat<-data.frame(x1=rnorm(10),x2=rnorm(10),x3=rnorm(10)) nam<-c('x1','x2','x3') library(gtools) com<-combinations(3,2,1:3) mod<-lm(y~nam[com[1,1]],data=dat) #error in model frame....:variable
2019 Jul 19
2
ALTREP wrappers and factors
Hi Jiefei and Kylie, Great to see people engaging with the ALTREP framework and identifying places we may need more tooling. Comments inline. On Thu, Jul 18, 2019 at 12:22 PM King Jiefei <szwjf08 at gmail.com> wrote: > > If that is the case and you are 100% sure the reference number should be 1 > for your variable *y*, my solution is to call *SET_NAMED *in C++ to reset > the
2013 Jan 11
4
count combined occurrences of categories
Dear all,   i would like to count the number of times where I have combined occurrences of the categories of 2 variables.   For instance, in the dataframe below, i would like to know how many times each author (au1, au2, au3 represent the first, second, third author) is associated with each of the category of the variable 'nam'. The position of the author does not matter.   nam <-
2008 Jan 22
1
deparse, substitute and S4 generics
Hello everyone, I encountered the following confusing behavior of 'deparse' and 'substitute' while programming with S4 classes (see example below). It seems like the presence of '...' argument in the definition of the generic generates the problem. I have no clue why, can anyone explain that to me? Are there any "workarounds"? Thanks a lot for your time!
2009 Feb 19
1
Questions about biglm
Hello folks, I am very excited to have discovered R and have been exploring its capabilities. R's regression models are of great interest to me as my company is in the business of running thousands of linear regressions on large datasets. I am using biglm to run linear regressions on datasets that are as large as several GB's. I have been pleasantly surprised that biglm runs the
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
Hi Kylie, Is it a list with only numerics in it? (I only see REALSXPs there, but obviously inspect isn't showing all of them). If so, you could load it up into one big vector and then also keep partitioning information around. Bioconductor does this (see ?IRanges::CompressedList ). The potential benefit here being that the underlying large vector could then be a big out-of-memory altrep. How
2019 Jan 22
2
Objectsize function visiting every element for alt-rep strings
On Mon, 21 Jan 2019, Martin Maechler wrote: >>>>>> Travers Ching >>>>>> on Tue, 15 Jan 2019 12:50:45 -0800 writes: > > > I have a toy alt-rep string package that generates > > randomly seeded strings. example: library(altstringisode) > > x <- altrandomStrings(1e8) head(x) [1] > >
2009 Jun 10
1
ovirt-viewer crash - please help
Hi, Im running Fedora 10. I use the command : ovirt-viewer ovirt-appliance and ovirt-viewer opens up, which is a gray-yellow screen. there is a text box and a connect button. i enter the localhost.localdomain, 127.0.0.1 or static ip address and then it says that couldnt connect to the server and crashes. Would you please please help me. looking forward to your kind reply. zara --------------