similar to: Creating Enumerated Variables

Displaying 20 results from an estimated 10000 matches similar to: "Creating Enumerated Variables"

2009 Jun 29
2
How to read a list into R??
Dear R helpers: I have tried many times to find some way to read a list into R. But I faid. Here is an example: I have a file 'List.txt' which includes data as follows: [[1]] [1] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.0 0.0 0.0 [19] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 [[2]] [1] 0.0000000 0.5000000 0.0000000 0.0000000
2010 May 26
5
(no subject)
Dear group, Here is my data frame: > dput(u) structure(list(DESCRIPTION = structure(c(2L, 5L, 6L, 7L, 9L, 11L, 12L, 15L, 14L, 16L, 1L, 10L, 3L, 4L, 13L, 8L, 17L), .Label = c("COFFEE C Jul/10", "COPPER May/10", "CORN Jul/10", "CORN May/10", "COTTON NO.2 Jul/10", "CRUDE OIL miNY May/10", "GOLD Jun/10", "HENRY HUB
2008 Dec 16
8
sliding window over a large vector
Hi all, I have a very large binary vector, I wish to calculate the number of 1's over sliding windows. this is my very slow function slide<-function(seq,window){ n<-length(seq)-window tot<-c() tot[1]<-sum(seq[1:window]) for (i in 2:n) { tot[i]<- tot[i-1]-seq[i-1]+seq[i] } return(tot) } this works well for for reasonably sized vectors. Does
2023 Oct 31
1
weights vs. offset (negative binomial regression)
[Please keep r-help in the cc: list] I don't quite know how to interpret the difference between specifying effort as an offset vs. as weights; I would have to spend more time thinking about it/working through it than I have available at the moment. I don't know that specifying effort as weights is *wrong*, but I don't know that it's right or what it is doing: if I were
2013 Jan 10
2
transparency in segments()
Dear all, i would like to plot each value from my datasets as segment with defined transparency However, I didnt find out how to set the transparency. definition by "col=" in par() or segments() doesnt seem to work any suggestions? Thanks in advance. Kind regards, Robert Pazur example code: xx2 <-read.table("http://www.scandinavia.sk/data/R/0_05.csv", sep=";",
2009 Aug 04
3
Logistic Regression
Hi, Trying to setup a logistic regression model. (Something new to me. I usually use SVM.) The person explaining the concept explained to me that I can include a "group" variable so that the probabilities predicted by the model will be "per group" Does this make sense to anyone? If so, how would I implement this? Using the glm or lrm function? Thanks! -N
2008 Jul 17
2
nested calls, variable scope
Below is an example of a problem I encounter repeatedly when I write functions. A call works at the command line, but it does not work inside a function, even when I have made sure that all required variables are available within the function. The only way I know to solve it is to make the required variable global, which of course is dangerous. What is the elegant or appropriate way to solve
2013 Oct 04
2
Issue retrieving new certificate on host after original certificate was revoked
Folks -- I am attempting to retrieve a new certificate on a Puppet client whose certificate was revoked on the Puppet master. The original certificate was revoked using the command: # puppet cert --revoke el5-puptest-2.localdomain I have deleted the /var/lib/puppet/ssl directory on the client, and issued the following command: # puppet agent --test --waitforcert=20 This produces the
2009 Aug 12
1
what is the difference between the two logistic models?
Hi All, I have data with 400 individuals and the following information Grade: pass or fail coded as 1 for pass and 0 for fail Sex: male or female ( coded as 1 for male and 2 for female ) Age Teaching.method : can be 1,2,3 I want to fit a logistic regression where the outcome if (1=pass or 0 for fail) and the rest of the variables are the regressors. My question is that I am not sure
2006 May 01
6
R-2.3.0 make error
Dear list, When compiling the R-2.3.0 on FC4 x86_64, I got the following errors: make[3]: Entering directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o
2004 Dec 03
1
Difficulty implementing "scales" in a lattice plot
Hello all, I am rather new to lattice and have a simple question regarding formatting text labels on the axes. I have looked through my own archive on lattice notes, searched and examined 30 or so hits on Dr. Baron's search site, looked through my MASS book, my Data Analysis and Graphics Using R book, R news articles, and I have in my hand the lattice package instructions and have read and
2017 Oct 09
0
example of geom_contour() with function argument
library(mvtnorm) # you were misusing "require"... only use require if you plan to library(ggplot2) # test the return value and fail gracefully when the package is missing set.seed( 1234 ) xx <- data.frame( rmvt( 100, df = c( 13, 13 ) ) ) xx2 <- expand.grid( X1 = seq( -5, 5, 0.1 ) # all combinations... could be used to fill a matrix , X2 = seq( -5, 5, 0.1 )
2017 Oct 09
3
example of geom_contour() with function argument
Hi, This is not a HW problem, sadly: I was last in a classroom 30 years ago, and can no longer run off to the instructor :-( I apologize but I cut and paste the wrong snippet earlier and made a typo in doing so, but the result is the same with the more appropriate snippet. require(mvtnorm) require(ggplot2) set.seed(1234) xx <- data.frame(rmvt(100, df = c(13, 13))) v <- ggplot(data = xx,
2012 Nov 25
3
"argument is missing, with no default" OR "replacement has length zero"
Hello, I have a new data set and an old data set. Both have the same columns representing the same sort of measure. Within each data set (old and new) are 18 groups (simplified to three groups below). Within each group are individuals with unique ID numbers. These ID numbers may be the same as other ID numbers in different groups, but a particular ID number only appears once in each group. The
2019 Sep 11
4
Need to update gcc to version >=6 on CentOS 7 ?
$ sudo yum install devtoolset-7 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirror.vcu.edu * epel: mirror.siena.edu * extras: mirror.vcu.edu * updates: mirror.vcu.edu No package devtoolset-7 available. Error: Nothing to do On Wed, Sep 11, 2019 at 12:17 PM Gordon Messmer <gordon.messmer at gmail.com> wrote: > > On 9/11/19 9:05 AM,
2012 Apr 25
4
"Conditional" average
Hello, I have a set of data including age, wage and education level each called age76, wage76 and grade76 I want to know how i can calculate the average wage of people age 15 to 65 (each year separetly) , only for those who have an education level of 10 12 and 16... -- View this message in context: http://r.789695.n4.nabble.com/Conditional-average-tp4585313p4585313.html Sent from the R help
2007 Jan 30
2
dev IFB, few questions
I''ve made some tests... eth2 is my internal interface, LAN is connected here. Before I had IMQ device in AB mode... PREROUTING [A]fter NAT, POSTROUTING [B]efore NAT. I want the same situation on ifb. I do this in this way: --- # incoming traffic here from LAN is before NAT tc qdisc add dev eth2 handle ffff: ingress # outcoming traffic here from WAN is after NAT tc qdisc add dev eth2
2009 Oct 12
3
xyplot does not find variable in data
When we call a lattice function such as xyplot, to what extent does the "data" designation cause the function to look inside the "data" for variables? In the examples below, the "subset" argument understands that "Variety" is a variable in the data. But the "scales" argument does not understand that "nitro" is a variable in the data.
2009 Aug 03
3
session logging
Consider all the text that one sees on the console during an R session. Is there a way, within R, to make all this text--both the "output" and the "messages"--automatically get copied to a single text file, in addition to seeing it on the console? If I remember to save the console to a file at the end of my R session, that does it. But (1) That requires pointing and
2010 Aug 17
3
predict.lm, matrix in formula and newdata
Dear all, I am stumped at what should be a painfully easy task: predicting from an lm object. A toy example would be this: XX <- matrix(runif(8),ncol=2) yy <- runif(4) model <- lm(yy~XX) XX.pred <- data.frame(matrix(runif(6),ncol=2)) colnames(XX.pred) <- c("XX1","XX2") predict(model,newdata=XX.pred) I would have expected the last line to give me the