similar to: string into command

Displaying 20 results from an estimated 40000 matches similar to: "string into command"

2006 Nov 07
1
variable problem
Hi everyone, I am not sure this is possible so I would be interested in your responses. Say I have a variable 'v' with the string "myargument" in and I have a function 'f' that takes this argument as follows; f <- function( myargument=5 ) { ... does something... } Is there anyway I can say something like; f( v=10 ) such that it will be evaluated as f(
2013 Mar 13
2
holding argument(s) fixed within lapply
|Hello, Given a function with several arguments, I would like to perform an lapply (or equivalent) while holding one or more arguments fixed to some common value, and I would like to do it in as elegant a fashion as possible, without resorting to wrapping a separate wrapper for the function if possible. Moreover I would also like it to work in cases where one or more arguments to the original
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
2018 Feb 15
2
Director & Master Users
Awesome, thanks for the advice. Using the following now works... passdb { driver = static args = proxy=y password=doesnotmatter } Cheers. On Feb 15 2018, at 2:40 pm, Aki Tuomi <aki.tuomi at dovecot.fi> wrote: > > On 15 February 2018 at 20:22 Travis Dolan <travis.dolan at gmail.com> wrote: > > > Hello, > > I have Director setup to proxy
2005 Sep 07
1
fitting distribution tails
Hello, I want to fit a distribution to a dataset. Important is not the "overall" fitting but the fitting in the tail (e.g. all observations > x or the n highest values). Standard ML-estimation sometimes doesn't work here very well. We see that especially when we have truncated datasets the algorithms won't converge. In the case of lognormal distribution: It seems that the
2018 Feb 16
1
Director & Master Users
> On 15 Feb 2018, at 22.16, Travis Dolan <travis.dolan at gmail.com> wrote: > > It would look as though the changes have now negatively affected a "normal" user from logging in. > > > telnet host 143 > > a login username password > > > a NO [AUTHENTICATIONFAILED] Authentication failed. > > > telnet host 143 > > 1 login
2011 Apr 03
1
Help in splitting ists into sub-lists
Dear List, Let's say I have a list whose components are 2 matrices (as exemplified in the "mylist" object below). I'd like to create a list with components being 4 matrices based on an logical index vector. is there a way to simplify what I'm doing to obtain the results in "mylist2"? I'd like something that would work on an arbitrary number of elements in
2003 May 31
5
parse on left hand side of R assignment
I keep finding myself in a situation where I want to calculate a variable name and then use it on the left hand side of an assignment. For example iteration <- 1 varName <- paste("run",iteration,sep="") myList$parse(text=varName) <- aColumn I want to take some existing variable "aColumn" and use the name "varName" name for it and put it into a
2006 Jun 20
1
arima fails when called from command line
I'm sure there is no consistent way to reproduce this, but I'm hoping someone has some information. I have a time series we'll call y. The data gets updated every day, so I run a cron job that fits and predicts from an arima(0,0,1) X (1,1,1)_7 model. When I open R and run the script, it processes completely. If I call the script via a crontab entry R --no-save --slave <
2023 Feb 14
1
File\Directory not healing
I guess you didn't receive my last e-mail. Use getfattr and identify if the gfid mismatch. If yes, move away the mismatched one. In order a dir to heal, you have to fix all files inside it before it can be healed. Best Regards, Strahil Nikolov ? ???????, 14 ???????? 2023 ?., 14:04:31 ?. ???????+2, David Dolan <daithidolan at gmail.com> ??????: I've touched the directory one
2010 Mar 26
5
smart way to turn a vector into a matrix
Hello guys, I am working on a matrix which looks like this one: > initialMatrix <- > rbind(cbind(rep("A",3),seq(1,3)),cbind(rep("B",4),seq(1,4)),cbind(rep("C",3),seq(1,3))) > initialMatrix [,1] [,2] [1,] "A" "1" [2,] "A" "2" [3,] "A" "3" [4,] "B" "1" [5,]
2007 Nov 07
2
Trouble in creating a list
I want to create a list based on the information from a data.frame, Model. So I tried the following: MyList <- list(colnames(Model)[2] = levels(Model$(colnames(Model)[2]))) but it failed with an error: Error: unexpected '=' in "list(colnames(Model)[2] =" I have the following problems with this command line: (1) I wanted to use colnames(Model)[2] as a tag for the list:
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
2009 Jan 12
2
assign a list using expression?
Dear R-users, I would like to assign elements to a list in the following manner: mylist <- list(a = a, b = b, c = c) To do this I tried myexpr <- expression(a = a, b = b, c = c) mylist <- list( eval(myexpr) ) It ends up by overwriting a when b is assigned and b when c is assigned. Additionally the element of the list does not have a name. Could you tell me why this is the case? Thank
2008 Jan 18
1
Assigning into each of a list of dataframes
What is the right way to assign a new variable into each a of list of data frames? Here is my failed attempt: mylist <- list(df1 = data.frame(A = runif(5), B = runif(5)), df2 = data.frame(A = runif(5), B= runif(5))) lapply(mylist, function(x){x$Y <- x$A * x$B}) $df1 [1] 0.25589928 0.03446026 0.94992362 0.21388326 0.08668821 $df2 [1] 0.08771839 0.05643553 0.09036894
2023 Feb 14
1
File\Directory not healing
I've touched the directory one level above the directory with the I\O issue as the one above that is the one showing as dirty. It hasn't healed. Should the self heal daemon automatically kick in here? Is there anything else I can do? Thanks David On Tue, 14 Feb 2023 at 07:03, Strahil Nikolov <hunter86_bg at yahoo.com> wrote: > You can always mount it locally on any of the
2015 May 04
2
Define replacement functions
Hello I tried to define replacement functions for the class "mylist". When I test them in an active R session, they work -- however, when I put them into a package, they don't. Why and how to fix? make_my_list <- function( x, y ) { return(structure(list(x, y, class="mylist"))) } mylist <- make_my_list(1:4, letters[3:7]) mylist mylist[['x']] <- 4:6
2005 Mar 16
8
Summing up matrices in a list
Dear all, I think that my question is very simple but I failed to solve it. I have a list which elements are matrices like this: >mylist [[1]] [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 [[2]] [,1] [,2] [,3] [1,] 7 9 11 [2,] 8 10 12 I'd like to create a matrix M<-mylist[[1]]+mylist[[2]] [,1] [,2] [,3] [1,] 8 12 16 [2,] 10 14 18
2008 Jun 04
3
how to automatically create objects with names from a string list?
Suppose I have a string of objects names: name <- c("foo", "bar", "baz") and I would like to use a for loop to automatically create three objects called "foo", "bar" and "baz" accordingly. Then how can this be done" (so that in the workspace, foo = 1, bar = 2 and baz=3) for (i in name) { ..... } Thanks! Mark
2009 Oct 08
3
how to convert list into a vector
Hi , I want to convert a my list: > myList [[1]] [1] 1 2 3 4 5 [[2]] [1] 6 7 8 [[3]] [1] 9 10 11 into something like c(1,2,3,4,5,6,7,8,9,10,11) I realized that this is possible by > c(do.call("cbind",myList)) But only when list[[1]] through list[[3] have equal length of vectors within them Any ideas? Thank you for time, -Daniel -- View this message in context: