similar to: Creating a Factor Object in C code?

Displaying 20 results from an estimated 30000 matches similar to: "Creating a Factor Object in C code?"

2004 Apr 07
2
Help with character columns in a table
I have done a read.table on a data file with the aim of extracting subsets of the data eg table[table$desc = 'result1',] How can I convert $desc to a character type? At present it is seen by typeof() as an integer. How can I do the equivalent of table[table$desc = 'result1' && table$amt > 20, ] Thanks, Rory -- Rory Campbell-Lange <rory at
2011 Jan 05
1
Minimum of an ordered factor
Hi everybody, Is there a particular reason, why this code does not work as intended: z <- factor(LETTERS[1:3], ordered = TRUE) u <- 4:6 min(z[u > 4]) Error in Summary.factor(2:3, na.rm = FALSE) : min not meaningful for factors I agree that min is indeed not meaningful for not ordered factors, but it makes sense for ordered factors. Especially since z[3] <
2012 Aug 27
3
Changing entries of column of type "factor"/Adding a new level to a factor
What is a smart way to change an entry inside a column of a dataframe or matrix which is of type "factor"? Here is my script incl. input data: > #set working directory: > setwd("K:/R") > > #read in data: > input<-read.table("Exampleinput.txt", sep="\t", header=TRUE) > > #check data: > input Ind M1 M2 M3 1 1
2008 Nov 24
4
Calculating sum of letter values
Hi all If I have a string, say "ABCDA", and I want to convert this to the sum of the letter values, e.g. A -> 1 B -> 2 etc, so "ABCDA" = 1+2+3+4+1 = 11 Is there an elegant way to do this? Trying something like which(LETTERS %in% unlist(strsplit("ABCDA", ""))) is not quite correct, as it does not count repeated characters. I guess what I need is
2001 Oct 31
3
readonly - can't change
well i've tried everything trying to get r/w access to my linux box (debian 2.2.3 running samba 2.0.7) from win2k. can only get readonly. i'm hoping some kind sould might be able to take a look at my samba config and let me know what i'm doing wrong... # Samba config file created using SWAT # from localhost (127.0.0.1) # Date: 2001/11/01 00:39:30 # Global parameters [global]
2008 Sep 17
1
Extracting subsets by factor level?
Hi I have a data frame which looks like the following (it is a table of commit logs to a source repo). The Author column is treated as a factor, by virtue of stringsAsFactors being set to TRUE, so I can extract the number of commits per author by using table(logs$Author). Is there an elegant way to extract all subsets of this frame by the Author column - i.e. that returns say a list of data
2007 Aug 07
3
ISDN30 card for UK : sanity check
We will be connecting our Asterisk server to ISDN 30 and intend using the Sangoma A101 card. The install location is in London (UK). Sangoma card at Voipon http://www.voipon.co.uk/sangoma-a101-pri-isdn-card-p-132.html?gclid=CI32vJz22I0CFQXklAodIgjHaA I would be grateful to hear if this is the right choice of card. Usage reports would be helpful. Regards Rory -- Rory Campbell-Lange
2012 Dec 02
2
Change case of factor in data frame
I am trying to write a function to change the case of all of the text in a data frame to lower case. I do not have foreknowledge of the data frame names or the data types of each column. It seems that if one references the data frame by index, then it returns class "data.frame" but if it is referenced by name, it returns class "factor" or whatever the column actually is:
2004 Jan 29
1
Confirmatory Factor Analysis in R? SEM?
Hi Has anyone used R to conduct confirmatory factor analysis? This email pertains to use of SEM. For context consider an example: the basic idea is that there are a bunch of observables variables (say study habbits, amount of time reading in the bus, doing homework, helping other do homework, doing follow-up on errors etc.) and one believes that all these variables maybe measured by two or
2009 Jul 08
1
nested model with random factors
I am really having trouble with getting the right syntax for my model. Here is a truncated version of my data: > data Ind Treatment Order Date PC1 1 PER14 SC 3rd 4-May-09 0.5704611 2 PER14 SH 1st 26-Apr-09 0.5329025 3 PER14 AC 2nd 29-Apr-09 2.1392279 4 PER25 SC 2nd 29-Apr-09 -0.2083382 5 PER25 SH 3rd 3-May-09 3.7818356 6
2012 Nov 17
2
problem with "any" function
Dear R users, I have the "any" function of R  any(ind.c, ind.r, ind.sgn) all are logical factors  it works fine when any of three is true but when they are combined it doesnt work. i tried this any(ind.c, ind.r, ind.sgn,((ind.c==TRUE) & (ind.r==TRUE)), ((ind.c==TRUE) & (ind.sgn==TRUE)),((ind.r==TRUE) & (ind.sgn==TRUE)),  ((ind.c==TRUE) & (ind.r==TRUE) &
2011 Oct 25
2
extract data for specific levels factor
Dear all, I'm trying to analyze data with the following structure: ind cat tx age 40.2 por fol peq vh 35 41.9 por fol med vh 35 68.9 por fol preov vh 35 71.5 por fol peq ser 37 67.5 por fol med ser 37 76.9 por fol preov ser 37 78.7 por fol peq otr 37 78.3 por fol med otr 37 82.1 por fol
2004 Dec 14
1
IMAP Subdirectories
Hi Using Apple Mail I cannot make subdirectories within new directories I have made on a Debian Dovecot-driven IMAP server (version 0.99.11-3). Some users, having used Exchange, expect to be able to do this. However I can't make it happen, even after doing some tests by chmod-ing the top-level directories to 777 and enabling the mail_full_filesystem_access = yes option on a test
2005 Sep 19
1
Shared access to mail accounts.
We are intending to have some project mail accounts which many people (up to 10) will share. Will this work? Our configuration uses imap only, with maildir format mail storage. Thanks Rory -- Rory Campbell-Lange <rory at campbell-lange.net> <www.campbell-lange.net>
2007 Aug 04
1
Hardware advice for 100 extensions, routing via ISDN
I would be grateful for some comments on our proposed machine specs for a new Asterisk installation at a client with an initial 70 extensions. The system should be able to handle 100 extensions. The system will have the following main features: - PSTN connection via ISDN 30, dealing with all incoming calls. Outgoing will be through ISDN initially - 70-100 Snom 300 handsets - 1-2
2011 Sep 12
2
function to include factors in summary data frame
Hi all, I have a dataframe that includes data on individuals that are distributed across multiple rows. I have aggregated the data using ddply, but I have columns in the original data frame that are factors ( such as sites "A", "B", and "C") that I would like to include in the new data frame. I have done this in a clunky way using match() and a loop, but am
2006 May 11
1
factors
Hi R-users, I had a minor issue while demonstating R that I can't explain. I am hoping someone will have suggestions. The only difference is a call to fix() in between that I made to ensure people were following me. However, that seems to have altered the way R code got executed. I was wondeirng if people have any insights. Arnab # When it does work x <-letters[1:10] marks
2009 Jul 01
2
'singularity' between fixed effect and random factor in mixed model
Hi, I just came across the following issue regarding mixed effects models: In a longitudinal study individuals (variable ind) are observed for some response variable. One explanatory variable, f, entering the model as fixed effect, is a (2-level) factor. The expression of that factor is constant for each individual across time (say, the sex of the individual). ind enters the model as grouping
2007 Aug 16
2
Incoming and Outgoing zaptel configuration : ISDN30e
We are trying to configure a Sangoma A101 card to allow both incoming and outgoing calls on a UK (BT) ISDN30e line with only 24 channels enabled. At present incoming calls work fine. We can't call out -- we get a BUSY/CONGESTED error. Do we need another context in our zapata.conf? In other words, do we need to reserve, say, channels 17-24 for outgoing calls? I also wonder if the signalling
2004 Jul 20
2
Newbie question: configuration for virtual users
Hi! I'm looking forward to deploying dovecot as an IMAP server. I did some research into the various options and it looks like dovecot is the right daemon for me. I'll be using it with Exim. I am running a few tens of users on my server, most of them small numbers of people part of a small company, e.g. example.com. At present I have exim delivering to mbox in each virtual user's