similar to: how to extract characters from a character string

Displaying 20 results from an estimated 5000 matches similar to: "how to extract characters from a character string"

2008 Feb 11
2
how to generate a column based on other columns in a data frame
HI, I am working on a data set with multiple collections of mosquitoes at sampling sites. Each row represents a collection of individual samples with coordinates for each collection. ... X, Y,... 1 36.435 30.118 2 36.435 30.118 3 36.435 30.118 4 35.329 29.657 5 35.329 29.657 6 36.431 30.111 7 36.431 30.111 8 35.421 29.797 9 35.421 29.797 10 35.421 29.797
2008 Feb 12
2
how to specify modes of certain fields in read.table
I have a data file with 50 columns. Among them, there are two coordinates, X and Y X Y 641673.78807 3607080.78438 641436.56207 3607108.30543 641165.28042 3607136.82957 640879.58373 3607116.20568 When I use read.table, it rounds X and Y to the maximal 8 decimal number as. 641673.8 3607081 641436.6 3607108 641165.3 3607137 640879.6 3607116 640683.5 3607105 My question
2008 Sep 07
1
run optim() on a list
Hi, I am at the end of my wit to figure out how to run the optim function on a list. Basically, I have a data set of three columns as "Site", "Pool" and "Positivity" ( the full data set is copied at the end). I want to run the maximal likelihood estimation separately on subsets split by "Site" data<-read.table(...)
2008 Jan 31
1
decrease amount of ticks on y axis in lattice levelplot
Hi all, How can I decrease the number of ticks on the y-axis in a lattice levelplot()? I have as many ticks displayed on the y-axis as I have columns of data (1000 columns), how can I decrease this amount of ticks, while still properly displaying all the data? Note that I get my data from a matrix object, in which the z-values of the levelplot are the actual values in the matrix, whereas the
2008 Mar 27
1
panel function question
I have two data sets with locations, X, Y of houses (df.house) and habitats(df.habitat), respectively. In each dataset, there are 3 replicates (Repeat). Because each replicate has different locations of houses and habitats, I would like to plot them in panels. I wrote something like this: mypanel<-function(x,y,subscripts,...){ panel.xyplot(x,y,pch=20) panel.xyplot(
2008 Jan 07
1
How to rearrange lattice graphics output?
My question arises when I use levelplot graphics. For example, levelplot(z~x*y|fg) where fg is a factor with three levels of 'a','b','c'. The panels come out in a default order. I would like to rearrange the panels in a manner of 'c','b','a'. I used fg<-ordered(fg, levels=c('c','b','a')) But the panels are still the
2008 May 06
1
substring
I have a data frame such as Name DISC1_5916 DABC2_789 ABCD_1234 I want to substring column Name so that DISC1 DABC2 ABCD ... Thanks. --------------------------------- [[elided Yahoo spam]] [[alternative HTML version deleted]]
2008 May 19
2
how can i sort a column of data.frame ?
i have a data.frame with several columns that i want to sort one of them (one column) by descending order in such way that this sorting out recover all colums. what should i do? -- View this message in context: http://www.nabble.com/how-can-i-sort-a-column-of-data.frame---tp17324725p17324725.html Sent from the R help mailing list archive at Nabble.com.
2004 Jan 13
1
SMB Signature verification failed on incoming packet
My setup is Samba/smbclient version 3.0.1 on linux RedHat 9. \\snapper\dfs is a dfs share on snapper, a Win2k3 Active Directory server. My smb.conf contains: [global] realm = ciswinnet.cis.uab.edu workgroup=CISWINNET security = ADS encrypt passwords = yes password server = snapper.cis.uab.edu client use spnego = yes I am trying to run the following command: smbclient \\\\snapper\\dfs
2009 Feb 23
1
why results from regression tree (rpart) are totally inconsistent with ordinary regression
Hi, In my analysis of impacts of insecticide-treated bednets on malaria, I look at the relationship between malaria incidence and mosquito behaviors. The condensed data set is copied here. Ordinary regression (lm) shows that Incidence was negatively related to Mortality. This makes sense because the latter reflected the strength of killing mosquitoes by insecticide-treated nets. Since the
2008 Jan 07
3
two graphs
Dear R community, I am plotting a histogram and would wish to display another variable of the same dataset in a very narrow heatmap just below the x-axis. Never mind the specifics of my task: How can I draw a second graph/image just below a first graph/image? Thank you! Georg. *************** Georg Ehret JHU Baltimore, MD 21043, USA [[alternative HTML version deleted]]
1998 Apr 21
1
Windows95 ARPing like crazy
Hi again, I realize this is generally not the place for this question but this is always where the answers are so here goes. We have a couple of win95 Pcs that regularly go nuts and arp foreach IP address on their subnet. The resulting broadcast storm is make even worse because of the inability of our net. admin. to 1) explain it 2) contain it 3) fix it (not too bright). I checked the registry
2011 Apr 08
3
a strange behavior with ifelse
I have used R for years but run into a seemingly simple problem involving 'ifelse'. condensed code like this a=c(2,NA,NA,NA,2,2,NA,2,NA,2) b=c(NA,1,1,NA,2,2,2,2,2,2) #I want to combined a and b into c so that c would be a valid number either a or b is not missing c=ifelse(a==1|b==1,1,ifelse(a==2|b==2,2,NA)) cbind(a,b,c) a b c [1,] 2 NA NA [2,] NA 1 1 [3,] NA 1 1
2004 Jul 01
2
Bug in SOM package (PR#7038)
Bug in "SOM" package in R. This simple code withot for loop runs:-------simple.r-------- library(som) A <- as.matrix(read.table("C:/code/h.txt", sep="\t", header=TRUE, row.names=1)) print(som(A,1,2)$visual) print(som(A,1,3)$visual) ---------------------------------------- The same code if inserted in for loop generates "Assertion failure" in
2010 Dec 14
1
rpart - how to estimate the “meaningful” predictors for an outcome (in classification trees)
Hi dear R-help memebers, When building a CART model (specifically classification tree) using rpart, it is sometimes obvious that there are variables (X's) that are meaningful for predicting some of the outcome (y) variables - while other predictors are relevant for other outcome variables (y's only). *How can it be estimated, which explanatory variable is "used" for which of
2009 Feb 25
1
problems with arrangement of figures by layout function
Hi, I want to have histograms behind the regression tree figure. Since 7 leafs resulted from the tree model (rpart), it would be nice to have correspondent histograms below the tree figure. After a little study, I could generate the correspondent histogram for each leaf, but can't figure out how to arrange them in the right place. I tried something like
1998 Apr 10
1
Windows NT 4.0 SP3
I have Samba 1.9.17p2 and it works great on NT4.0 SP2 When I update to NT4.0SP3, my Samba connection gives me the following message: The account is not authorized to login from this station. Did something change? Maybe NT4.0 SP3 uses a smb.conf option that wasn't used before? I've installed the package version from the Solaris 2.5 web site. I'm actually running Solaris 2.5.1
1998 Apr 21
3
"Not listening for calling name" error - huh?
Hi all, I have two samba machines running v1.9.18p4. When I try and list the shares on the second machine (calvin) fromn the first machine (hobbes) I get this: Session request failed (131,129) with myname=HOBBES destname=CALVIN Not listening for calling name Try to connect as another name (instead of HOBBES) You may find the -n option useful for this Any idea what this is trying to tell me?
1998 Apr 22
1
Hiding shares in Network Neighborhood?
Hi all - I'll be the first to admit I don't know a lot about Windows networking, but I've managed to get samba (latest version) up and running and even have a cool netlogon script :) My config has shares for [homes] and [netlogon] and [foobar] (a test). When I look around in Network Neighborhood it lists homes, netlogon, foobar, and philip (my username). Is there some way to make
2011 Jul 23
2
sum part of a vector
Dear colleagues, I have a data set that looks roughly like this; mydat<-data.frame(state=c(rep("Alabama", 5), rep("Delaware", 5), rep("California", 5)), news=runif(15, min=0, max=8), cum.news=rep(0, 15)) For each state, I'd like to cumulatively sum the value of "news" and make that put that value in cum.news. I'm trying as follows but I get