similar to: function arguments: name of an object vs. call producing the object?

Displaying 20 results from an estimated 8000 matches similar to: "function arguments: name of an object vs. call producing the object?"

2016 Apr 22
1
Unique Ordering
Hi R-Help, data at bottom I've been struggling with a problem where I need to order based on 1) the Frequency "Freq" and 2) keeping each group of 3 of the same type together "Var2" but I want across all groups it to go "high to low" based on the earn factor. Thank you! structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L, 3L, 2L, 3L, 1L, 2L, 3L, 1L,
2011 Jul 01
2
Initiating in BNArray
Hi, I'm trying to understand some details about an example maintened in [1]. According that link, I have total.data as a data set (am I right?). But I don't understand how is built that table. I saved the dataset in a file, with dput(), and had something like this: structure(list(df.all = structure(list(V1 = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
2008 Jul 06
2
lattice question
I'm creating a lattice barchart based off a pretty complicated data structure. The barchart comes out quite nice ( thanks to lattice ) but the problem is that the horizontal axis comes out all scrunched because the barchart doesn't know that the intervals of Var.1 are really "associated" with the conditioning variable Var.2. Therefore, all the intervals of Var.1 are put on
2012 Nov 14
2
aggrete data from combination
Dear R users, A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I want all diameters values for different combination of plots. For example I want all d values for all posible combination, 100C2 (all d values for plot 1 with all d values in the plot 2.......with all d values from plot 1 with all d values from plot 100, ...... with all d values from plot 99 with all d values
2008 Sep 26
2
Date Time conversion
what am I doing wrong? chron(as.character(f), format=c(dates="%m/%d/%y", times="%h:%m")) f <- structure(c(51L, 60L, 66L, 87L, 90L, 115L, 23L, 35L, 37L, 6L, 12L, 55L, 84L, 96L, 109L, 17L, 29L, 41L, 3L, 74L, 94L, 102L, 30L, 8L, 46L, 69L, 107L, 15L, 25L, 39L, 1L, 71L, 95L, 19L, 56L, 62L, 76L, 85L, 99L, 111L, 42L, 4L, 52L, 61L, 67L, 91L, 13L, 24L, 36L, 38L, 7L, 81L, 82L, 57L,
2011 Nov 08
2
nesting scale_manual caracteristics in ggplot
Hi there, I am having a little problem with combining three scale_manual commands in a facet plot. I am not able to combine the three different characteristics, instead ending up with three different descriptions next to the graph for the same geom. I would like to see two separate labels (not three); one describing lines 1-7 and the other 8-14. For each of the treatments (A-B) I want a
2013 Feb 27
2
matrix multiplication
Hi, Try this: #mat1 is the data res<-do.call(cbind,lapply(seq_len(nrow(mat1)),function(i) {new1<-do.call(rbind,lapply(seq_len(nrow(mat1[-i,])),function(j) {x1<-rbind(mat1[i,],mat1[j,]); x2<-(abs(x1[1,1]-x1[2,1])*abs(x1[1,5]-x1[2,5]))+(abs(x1[1,2]-x1[2,2])*abs(x1[1,6]-x1[2,6]))+(abs(x1[1,3]-x1[2,3])*abs(x1[1,7]-x1[2,7]))+(abs(x1[1,4]-x1[2,4])*abs(x1[1,8]-x1[2,8]))}));new1}))
2013 Apr 11
1
Dotchart per groups
Hi all, I would like to ask you for help. I did a dotplot - using dotchart function. There are two localites (loc) with values 75 or 56 in my data ZZ. The f column has 4 levels: P1, S1, S8, R6. The dataframe is ordered by N value, pchloc value is assign to use "pch" in plot. > head(ZZ) loc f N color ordered pchloc 98 75 S1 6.39 green 1 16 99 75 S8 6.44 blue
2010 Apr 19
1
What is mclust up to? Different clusters found if x and y interchanged
Hello All... I gave a task to my students that involved using mclust to look for clusters in some bivariate data of isotopes vs various mining locations. They discovered something I didn?t expect; the data (called tur) is appended below. p <- qplot(x = dD, y = dCu65, data = tur, color = mine) print(p) # simple bivariate plot of the data; looks fine mod1 <- Mclust(tur[,2:3]) mod1$G mod2
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) str(Empdata) Empdata$gnipc<-as.numeric(Empdata$gnipc) install.packages("systemfit") library("systemfit") pdata <- plm.data(Empdata,
2017 Dec 14
2
help with recursive function
Hi, I need some help with running a recursive function. I like to run funlp2 recursively. When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE". I have never built a recursive function before so having trouble executing it in this case. I would appreciate any help or guidance to resolve this issue.
2017 Dec 06
2
Odd dates generated in Forecasts
Dear friends, I have a weekly time series which starts on Jan 4th, 2003 and ends on december 31st, 2016. I set up my ts object as follows: MyTseries <- ts(mydataset, start=2003, end=2016, frequency=52) MyModel <- auto.arima(MyTseries, d=1, D=1) MyModelForecast <- forecast (MyModel, h=12) Since my last observation was on december 31st, 2016 I expected my forecast date to start on
2012 Sep 02
3
Loading Chess Data
All, What would be the most efficient way to load the data at the following address into a dataframe? http://ratings.fide.com/top.phtml?list=men Thanks, David -- View this message in context: http://r.789695.n4.nabble.com/Loading-Chess-Data-tp4642006.html Sent from the R help mailing list archive at Nabble.com.
2017 Dec 14
2
help with recursive function
My own typo ... whoops ... !( any(dat2$norm_sd >= 1 )) On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <ericjberger at gmail.com> wrote: > You seem to have a typo at this expression (and some others like it) > > Namely, you write > > any(!dat2$norm_sd) >= 1 > > when you possibly meant to write > > !( any(dat2$norm_sd) >= 1 ) > > i.e. I think your !
2017 Dec 14
3
help with recursive function
If you are trying to understand why the "stopifnot" condition is met you can replace it by something like: if ( any(dat2$norm_sd >= 1) ) browser() This will put you in a debugging session where you can examine your variables, e.g. > dat$norm_sd HTH, Eric On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <ericjberger at gmail.com> wrote: > The message is coming from
2017 Dec 14
2
help with recursive function
Hi, I accidently left out few lines of code from the calclp function. Updated function is pasted below. I am still getting the same error ?Error: !(any(data1$norm_sd >= 1)) is not TRUE? I would appreciate any help. Nilesh dput(calclp) function (dataset) { dat1 <- funlp1(dataset) recursive_funlp <- function(dataset = dat1, func = funlp2) { dat2 <- dataset %>%
2017 Dec 14
0
help with recursive function
You seem to have a typo at this expression (and some others like it) Namely, you write any(!dat2$norm_sd) >= 1 when you possibly meant to write !( any(dat2$norm_sd) >= 1 ) i.e. I think your ! seems to be in the wrong place. HTH, Eric On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] < nilesh.dighe at monsanto.com> wrote: > Hi, I need some help with running a
2017 Dec 14
0
help with recursive function
Eric: I will try and see if I can figure out the issue by debugging as you suggested. I don?t know why my code after stopifnot is not getting executed where I like the code to run the funlp2 function when the if statement is TRUE but when it is false, I like it to keep running until the stopifnot condition is met. When the stopifnot condition is met, I like to get the output from if statement
2012 Feb 21
2
Dataframes in PLS package
I have been working with the pls procedure and have problems getting the procedure to work with matrix or frame data. I suspect the problem lies in my understanding of frames, but can't find anything in the documentation that will help. Here is what I have done: I read in an 10000 x 8 table of data, and assign the first four columns to matrix A and the second four to matrix B pls <-
2012 Jul 14
2
Arrange two columns into a five variable dataframe
Hi, I hope that folks can give me some simple approaches to taking the data set below, which is accumulated in two columns called "long" and "group", then arrange the data is the "long" column into a data frame containing five variables: "Group 1", "Group 2", "Group 3", "Group 4", and "Group 5". I am hoping for a few